Num# - script and chart function
Num#() interprets a text string as a numerical value, that is it converts the input string to a number using the format specified in the second parameter. If the second parameter is omitted, it uses the decimal and thousand separators set in the data load script. Custom decimal and thousand separator symbols are optional parameters.
Syntax:
Num#(text[, format[, dec_sep [, thou_sep ] ] ])
Return data type: dual
The Num#() function returns a dual value with both the string and the numeric value. The function takes the textual representation of the input expression and generates a number. It does not change the format of the number: the output is formatted in the same way as the input.
Arguments:
Argument | Description |
---|---|
text |
The text string to be evaluated. |
format |
String specifying the number format used in the first parameter. If omitted, the decimal and thousand separators that are set in the data load script are used. |
dec_sep |
String specifying the decimal number separator. If omitted, the value of the variable DecimalSep that is set in the data load script is used. |
thou_sep |
String specifying the thousands number separator. If omitted, the value of the variable ThousandSep that is set in the data load script is used. |
Example:
The following table shows the result of Num#( A, '#', '.' , ',') for different values of A.
A | String representation | Numeric value (here displayed with decimal point) |
---|---|---|
35,648.31 | 35,648.31 | 35648.31 |
35 648.312 | 35 648.312 | 35648.312 |
35.648,3123 | 35.648,3123 | - |
35 648,31234 | 35 648,31234 | - |