Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Set Number Layout to xx.00?
#1
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
Reply


Messages In This Thread
Set Number Layout to xx.00? - by Lars_74 - 07-28-2022, 11:11 PM
RE: Set Number Layout to xx.00? - by boriel - 08-02-2022, 10:32 PM

Forum Jump:


Users browsing this thread: 1 Guest(s)