str2var - convert a string to a value
oadl::str2var(str)
The str2var() function converts the string
str into an OADL value. It first attempts to parse the string
as a numeric constant (Integer, Float, etc.). If parsing fails, it
attempts to look up the string as a defined name (variable, constant,
or procedure) in the current context.
The value represented by the string str.
ArgCheck if exactly one argument is not
provided.
TypeCheck if str is not a
string.
UndefName if the string cannot be
parsed as a number and does not match any defined name.
v = oadl::str2var("3.14159")
typeof(v)
Float
v = oadl::str2var("nil")
typeof(v)
Null