krabourn
(Hey THIS is FUN)
2005-03-02 01:09 AM
FormatNumber bug in Kixtart 4.50 beta 1a

FormatNumber will cause a script to just stop if a number is less than zero and the first two decimal places are zero.

It does not matter if you have Explicit On or NoVarsInStrings On.

Example: 0.0012

Code:
BREAK ON
DIM $Nul
$Nul = SetOption("Explicit", "On")
$Nul = SetOption("NoVarsInStrings", "On")
$Nul = SetOption("WrapAtEOL", "On")

DIM $Number1, $Number2, $Number3
$Number1 = 1.0012
$Number2 = 0.0123
$Number3 = 0.0012

? "Test Number1: " FormatNumber($Number1, 4)
? "Test Number2: " FormatNumber($Number2, 4)
? "Test Number3: " FormatNumber($Number3, 4)
? "Test CDBL Number3: " FormatNumber(CDbl($Number3), 4)

QUIT 0



Ruud van Velsen
(Hey THIS is FUN)
2005-03-08 05:10 PM
Re: FormatNumber bug in Kixtart 4.50 beta 1a

Thanks for this report. FormatNumber is indeed broken for these type of numbers. As it happens, this is an 'old' bug as it also applies to 4.23 anb earlier versions...

Anyway, thanks again, I will fix this in the next update.

Kind regards,

Ruud


Ruud van Velsen
(Hey THIS is FUN)
2005-03-08 07:33 PM
Re: FormatNumber bug in Kixtart 4.50 beta 1a

Just to let you know that this bug has been fixed in the next build.

Thanks again!

Ruud