Page 1 of 1

Compiled PRINT_USING

Posted: Tue Sep 25, 2018 9:58 pm
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

Re: Compiled PRINT_USING

Posted: Tue Sep 25, 2018 10:20 pm
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.

Re: Compiled PRINT_USING

Posted: Tue Sep 25, 2018 11:26 pm
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

Re: Compiled PRINT_USING

Posted: Tue Sep 25, 2018 11:31 pm
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

Re: Compiled PRINT_USING

Posted: Tue Sep 25, 2018 11:33 pm
by martyn_hill
Hi again Tesla

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

Buonasera.

Re: Compiled PRINT_USING

Posted: Wed Sep 26, 2018 6:50 pm
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

Re: Compiled PRINT_USING

Posted: Wed Sep 26, 2018 9:08 pm
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.