Numeric Variable to String

STR_FORMAT (<variable>)             Convert numeric variable to string

This function returns a string value, formatting its numeric variable as a string. The conversion takes place according to the variable format. The variable must be of a numeric format.

The resulting string is the same as would be generated if the variable would be sent to output.

The function is especially useful when the user wishes to build a string made up of constants and variables, some of which are numeric.

Examples

Assume the format of NUM allows 3 digits for the fraction part.

NUM = 5/3;                          // NUM gets 1.666666...

S = STR_FORMAT (NUM);               // S gets "1.667"

S = STR_FORMAT (NUM) + " mm";       // S gets "1.667 mm"

The STR_FORMAT function may also be used in conjunction with the tool parameter functions, namely TOOL_FIRST, TOOL_LAST and TOOL_NEXT (see below), since they actually represent variables with a well-defined format.

S = STR_FORMAT(NEXT_TOOL(DIAMETER_));    // valid

Some functionality may be dependent on the product package. Contact your Reseller if you require a license.