f$FormatNumber (f$FormatZahl)
f$FormatNumber (f$FormatZahl)
Format a floating value using a format instruction. The format instruction corresponds to the format in the parameter table, though expressions can be converted directly here. Furthermore, this function can be applied to enable formatting for a special conversion while the format instruction in the PT otherwise generally applies for the parameter.
Hint: Formatting using the parameter table format can be determined with the function f$Parameter.
Syntax: | Text = f$FormatNumber( Number, Format ) | ||
| Argument | Type | Meaning |
| Number | Decimal | Number to be converted. An empty text (") is returned when entering NOVAL. |
| Format | String | Instruction text, according to which the output is formatted, analogous to the format in the parameter table (see Syntax). If Format is empty or has NOVAL, a default format is used. |
Result: | String | Number as formatted text | |
Example: | Text = f$FormatNumber( 12.2, '#' ) → Text = '12' Text = f$FormatNumber( 89.358, '#,00' ) → Text = '89,36' f$Message( 'Advice', f$FormatNumber(num,'0')+' articles have been found ) | ||