Upgrade Guides for Genero BDL / 2.50 upgrade guide |
The default formatting of a DECIMAL(P), SMALLFLOAT and FLOAT adapts to the significant digits of the value.
Floating point decimal types (like DECIMAL(5)) can store a large range of values, with a variable number of digits after the decimal point: For example, a DECIMAL(5) can store 12345 as well as 0.12345. See DECIMAL(p,s) for more details about floating point decimal types.
With Genero 2.50, the conversion to string from a DECIMAL(P), FLOAT and SMALLFLOAT has been revised, to keep all significant digits and avoid data loss.
MAIN DEFINE str STRING, dec12, dec12_bis DECIMAL(12) LET dec12 = 10.12999 LET str = dec12 DISPLAY str LET dec12_bis = str DISPLAY (dec12 == dec12_bis) END MAIN
10.13 0
10.12999 1
Values Vers<2.50 Vers>=2.50 ------------------------------------------------- 1.23456e123 1.23456e123 1.23456e123 1.23456e40 1.235e40 1.23456e40 123.456 123.46 123.456 123456.0 123456.0 123456.0 0.123456 0.12 0.123456 0.0123456 0.01 0.0123456 0.00123456 0.00 0.00123456 1.23456e-08 0.00 1.23456e-08
fglrun.decToCharScale2 = true