Function Val() Foundation
Converts a number in the form of a character string to a numeric value.
Val( <cNumber> ) --> nNumber
The return value of Val() is the numeric value represented in the character string <cNumber>.
The character function Val() converts a character string containing only digits or digits and a decimal point to its numeric equivalent. The character string <cNumber> is evaluated starting at the left. Leading blank spaces are ignored. The conversion ends when Val() hits a character which is not a digit or when a second decimal point appears.
When the number of decimal places for the display is fixed with the command SET FIXED ON, the function Val() returns a value which has the number of places after the decimal point set by SET DECIMALS. Places after the decimal point are rounded if necessary. When the setting SET FIXED is set to OFF, Val() returns a value with as many places after the decimal point as is included in <cNumber>.
The reverse functions to Val() are the functions Str() and Transform() which convert a numeric value to a character string.
If you see anything in the documentation that is not correct, does not match your experience with the particular feature or requires further clarification, please use this form to report a documentation issue.