Function Char2Var() Foundation
Converts a string into a value of a requested data type.
Char2Var( <cString>, <cValtype> ) --> xValue
|Data type||String format|
|Date||String must be formatted like "YYYYMMDD" (see DtoS())|
|Logic||First character must be "T" or "t" for TRUE, and "F" or "f" for FALSE|
|Numeric||Thousands separator is not allowed. Decimal separator must be a dot: "."|
The function returns a value of the requested data type. If the string cannot be converted, the function returns NIL.
The function converts a character string formatted as the string representation of another data type to a value of this data type. It is used in conjunction with Var2Char() which is the inverse function. Note, however, that Char2Var() operates only on the simple data types Character, Date, Numeric and Logic, while Var2Char() converts values of any data type to a string. If the first parameter <cString>does not contain a legal string representation of the requested data type, the function returns NIL.
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.