numberFormat
numberFormat(): String;
The numberFormat method of the Decimal primitive type returns a string containing the receiver in the numeric format defined for the current locale; for example, 07456.357 or 7,456.38. This can include thousands separators, sign characters, and decimal point characters.
The following example shows the use of the numberFormat method.
testDecimal(); vars decimalValue : Decimal [12,4]; // Define the Decimal variable begin decimalValue := 1234.56; // Defines the variable value write decimalValue; // Outputs 1234.5600 write decimalValue.numberFormat; // Outputs 1,234.56 decimalValue := -123456; // Defines the variable value write decimalValue; // Outputs -123456.0000 write decimalValue.numberFormat; // Outputs -123,456.00 end;
If you do not define the