| System Functions |
|
| Formats |
|
||||||||||||||
| 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 | 'FI' System Parameter, 'DP'= System Parameter, 'TH'= System Parameter, Data Format Masks . |
||||||||||||||
| Format 1 | Convert Numeric String to ASCII
Use this format to convert a numeric value to an ASCII character string; e.g.,
|
||||||||||||||
| Format 2 | Convert ASCII String to Mask STR(string$:mask$[,err_val$][,ERR=stmtref]) Use this format to convert and validate a string value based on the format mask (which dictates the size and content of the results) e.g.,
|
||||||||||||||
| Examples | The
following will print **OverFlow** if the value is too
large for the mask:
If value is too large with pennies, well try it without the pennies, or else print **OverFlow**:
|