CVAUTO†
Format†
CVAUTO(var)
Function†
- If a variable that stores a string is specified as an argument, it will be converted to an integer if it can be interpreted as an integer, or converted to a real number if it can be interpreted as a real number, and then stored again.
- If neither is possible, the string will not be converted.
- The behavior when a general purpose array variable is used as an argument is undefined.
Arguments†
- var
- Variable to be convered.
- strict_convert
- If a value other than 0 is passed, conversion will be performed only if the result of converting it back to a string matches the original string. Optional (default is 0). (Tc571-2)
Return value†
Related†
Version†
Example†
_val = '3.14159' // Assign a string
CVAUTO(_val)
GETTYPE(_val) // "2" is output (which is a real number)