Function Number2Round

Outputs a number with trailing decimal zeros removed.

Number2Round([VALUE],[USECOMMAS])

Parameters

#TypePassingDefaultNameDescription/Comments
1decimalrequiredn/aVALUEThe value to format
2booleanoptional.F.USECOMMASUses 1,000 comma separator

Returns

The formatted value as a string


Examples

Number2Round(AGENCYF1P,.F.)

If AGENCYF1P = 10.00, then 10 is output
If AGENCYF1P = 10.10, then 10.1 is output
If AGENCYF1P = 10.99, then 10.99 is output
If AGENCYF1P = 10.125, then 10.125 is output