ParseNum (a function in the Flat File Library) is obsolete, since it was replaced by the built-in function, ParseNumber.
Converts text «x» to a numeric value. If «x» is already numeric, it returns «x».
- (Use File → Add Library... to add this library)
ParseNum("3.14") → 3.14
An array can be passed, in which each cell of the array is parsed.
When «x» does not parse as a numeric value, such as
ParseNum("hello"), the following error occurs:
Evaluation Error: In the call to function Coerce_to_numeric, a value passed to the first parameter, x, could not be coerced to type Numeric, while evaluating function ParseNum.
Coercion to numeric can be accomplished in Analytica in other ways. For example, you can declare a function parameter with the qualifiers "coerce numeric". Then a string value passed to that parameter is parsed. The calling variable needs to have a non-date number format, since the number format of the calling object determines how the value is interpreted.