GLBasic forum

Main forum => Bug Reports => Topic started by: Warwick on 2014-Jun-17

Title: FORMAT$ error when displaying zero
Post by: Warwick on 2014-Jun-17
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]
Title: Re: FORMAT$ error when displaying zero
Post by: MrTAToad on 2014-Jun-17
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...