523
STR( ) Function
Convert Numeric to String
Formats
Where:
err_val$ Error value to return should the conversion fail. String expression. If you
omit err_val$ and the conversion fails, ProvideX either reports Error #43:
Format mask invalid or returns the value unformatted, depending on
your setting for 'FI'.
mask$
Format mask to be used in the conversion process. Max string size 8kb.
num
Numeric value to convert to a character string.
string$
String expression to be processed.
stmtref
Program line number or label to transfer control to.
Returns
String, converted and validated.
Description
The STR( ) function converts and validates strings. Add a format mask to specify the
size and format of the resultant character string. When a format mask is included,
STR( ) returns a string value converted from numeric using the default decimal point
and thousands separator set by 'DP' and 'TH'. If the format mask is omitted, 'DP' and
'TH' settings are ignored.
See Also
Format 1: Convert Numeric String to ASCII
STR(num[:mask$][,err_val$][,ERR=stmtref])
Use this format to convert a numeric value to an ASCII character string; e.g.,
A$=STR(5*6) ! (yields A$="30")
A$=STR(5*6:"000") ! (yields A$="030")
A$=STR(.01:"0.00") ! (yields A$="0.01")
A$=STR(99:"0.00","****") ! (yields A$="****")