numberFormat

numberFormat(): String;

The numberFormat method of the Integer primitive type returns a string in the number format defined for the current locale; for example, -7456.000 or 7,456. This can include thousands separators, sign characters, and decimal point characters.

The following example shows the use of the numberFormat method.

testInteger();
vars
    str : String;
    int : Integer;
begin
    int := -01234567890;
    write int;                  // Outputs -1234567890
    str := int.numberFormat;
    write str;                  // Outputs -1,234,567,890.00
end;

If you do not define the EnhancedLocaleSupport parameter in the [JadeEnvironment] section of the JADE initialization file on the database node or you set it to false, inconsistent results could be returned to the application server when running in JADE thin client mode and there are locale overrides, as all overrides on the application server are suppressed if enhanced locale support is not enabled. Formatting of locale data is done on the application server, based on the locale of the corresponding presentation client.