NumberToString
Mon 01 January 2018Syntax
NumberToString(Format, Number [, Width] [, Precision])
Description
Use the NumberToString function to format Number according to the pattern specified in Format .
Specify the Width and Precision parameters when you want to dynamically specify the width or precision. Both width and precision can be set based on Format . For example, the following statically specifies the width to be 6, and the precision to be 2:
&MyValue = NumberToString("%6.2", &Num);
The following example show the width taken dynamically from the &Width variable:
&MyValue = NumberToString("%*.2", &Num, &Width);
The following example shows how both the width and the precision values are taken dynamically from the &Width and &Precision variables, respectively.
&MyValue = NumberToString("%*.*", &Num, &Width, &Precision);
Parameters
Field or Control |
Definition |
---|---|
Format |
Specify the pattern for of how Number is supposed to be formatted. |
Number |
Specify the Number to be formatted. |
Width |
Specify the width of the string to be formatted. |
Precision |
Specify the precision of the string to be formatted. |
Returns
A string value.