07-28-2022, 11:11 PM
Hi,
I have been trying all evening to work on a very easy task. Well, I thought it would be easy... Nothing really worked and the only positive sideffect is that I learned a lot about ZX Basic.
I would like to set the number's layout to xx.00 Because it looks nicer.
Examples:
1.5 > 1.50
1 > 1.00
.1 > 0.10
The only thing I could come up is to work on two levels.
level a: the correct numbers the computer is working with, e.g. 12.012345
level b: the number handed over to a Sub-Routine which switches the number to a string, searches for "." and gives back a formated string to the main routine.
Thus: the Spectrum works with level a (number), the user only sees level b (string).
Is it really that difficult or is it me being just to stupid...?
Lars
I have been trying all evening to work on a very easy task. Well, I thought it would be easy... Nothing really worked and the only positive sideffect is that I learned a lot about ZX Basic.
I would like to set the number's layout to xx.00 Because it looks nicer.
Examples:
1.5 > 1.50
1 > 1.00
.1 > 0.10
The only thing I could come up is to work on two levels.
level a: the correct numbers the computer is working with, e.g. 12.012345
level b: the number handed over to a Sub-Routine which switches the number to a string, searches for "." and gives back a formated string to the main routine.
Thus: the Spectrum works with level a (number), the user only sees level b (string).
Is it really that difficult or is it me being just to stupid...?
Lars