Compiled PRINT_USING

Anything QL Software or Programming Related.
Post Reply
User avatar
Tesla
Bent Pin Expansion Port
Posts: 83
Joined: Fri Sep 15, 2017 6:19 pm

Compiled PRINT_USING

Post by Tesla »

Hi to all.

In a program of mine, I use the command PRINT_USING of toolkit II to display big money as 1.2E7 through the mask "###,###,###,". In the interpreted version of the program the PRINT_USING shows correctly 12.000.000, but in the turbo compiled version the PRINT_USING shows 120.000.
I put the mask in a variable masc$ and I call the priint using by PRINT_USING (masc$,money) where money=1.2E7
I dont understand what is the matter. Any ideas?

Thanks for the help


martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: Compiled PRINT_USING

Post by martyn_hill »

Hi Tesla

I just tried your example on QPC and it works identically in both SBasic and a Turbo'd job - giving the expected "12.000.000" output

Are you testing this on a real QL or other platform? If so, I can play around tomorrow and test again on my BBQL.

I've come across some oddities in my own Turbo compiled jobs in the past, but usually it comes down to my earlier misunderstanding of how Turbo 'optimises' expressions in a way that uncooked SuperBasic doesn't. That doesn't sound relevant here, however.


User avatar
Tesla
Bent Pin Expansion Port
Posts: 83
Joined: Fri Sep 15, 2017 6:19 pm

Re: Compiled PRINT_USING

Post by Tesla »

Martyn_hill wrote
I just tried your example on QPC and it works identically in both SBasic and a Turbo'd job - giving the expected "12.000.000" output

Are you testing this on a real QL or other platform? If so, I can play around tomorrow and test again on my BBQL.
I got this problem on my real QL with Gold Card, Qubide and Superhermes. Really the problem doesn't show at every call of the print_using, just to complicate things, but always appears when numbers are printed in column. Maybe it can depend by PRINT_USING spacing mechanism.
Thanks for your help


User avatar
Tesla
Bent Pin Expansion Port
Posts: 83
Joined: Fri Sep 15, 2017 6:19 pm

Re: Compiled PRINT_USING

Post by Tesla »

OOPS!
I forgiven the most important thing: MInerva rom 1.98 from Tetroid rom switcher, but the problem happened also with my old Minerva. This make me thinking to try with js rom, but I think this is not the problem.

Ciao


martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: Compiled PRINT_USING

Post by martyn_hill »

Hi again Tesla

Do you have a more fleshed-out code example showing how you are producing the column format?

Buonasera.


User avatar
Tesla
Bent Pin Expansion Port
Posts: 83
Joined: Fri Sep 15, 2017 6:19 pm

Re: Compiled PRINT_USING

Post by Tesla »

Print_using interpreted
Print_using interpreted
[/size]Ok these are the images. It is an old program, a football manager like that I made several years ago. It is a kind of clone of the original game for the Spectrum. Unlike other clones it has the animatione of the match (like the original) based on gigabasic sprites. It is focused on italian championship. I am making some restyling and is my wish to post it here on the forum in english language. In the previous versions the print using was not present.
Print_using compiled
Print_using compiled
Today it came in my mind that the reason coul be in the way the program saves data. I will investigate this matter.

Hi to all


martyn_hill
Aurora
Posts: 909
Joined: Sat Oct 25, 2014 9:53 am

Re: Compiled PRINT_USING

Post by martyn_hill »

I see, Tesla - looks fun!

Feel free to share a code-example that prints the entire line including the use of PRINT_USING - I'm wondering if the use of print separators (TO , ; etc) is handled differently under Turbo.

M.


Post Reply