FORMAT$ error when displaying zero

Previous topic - Next topic

Warwick

When using the FORMAT$ function to display the value zero with zero digits after the decimal point, a blank value is output instead.

Code (glbasic) Select
DEBUG "[" + FORMAT$(1, 0, 0) + "]\n" // Incorrectly outputs [ ]
DEBUG "[" + FORMAT$(1, 0, 1) + "]\n" // Correctly outputs [1]
DEBUG "[" + FORMAT$(1, 1, 0) + "]\n" // Correctly outputs [0]

MrTAToad

Try this instead :

Code (glbasic) Select
DEBUG "[" + FORMAT$(1, 0, 0.0) + "]\n" // Incorrectly outputs [ ]
DEBUG "[" + FORMAT$(1, 0, 1) + "]\n" // Correctly outputs [1]
DEBUG "[" + FORMAT$(1, 1, 0) + "]\n" // Correctly outputs [0]


It looks like there is a parsing error...