loadstring
loadstring(t_string[s_langMode] ) =>t
Description
Opens a string for reading, then parses and executes expressions stored in the string, just as load does in loading a file.
loadstring is different from evalstring in two ways: (1) it uses lineread mode, and (2) it always returns t if it evaluates successfully.Arguments
|
File to be loaded. Uses the file name extension to determine the language mode to use. |
Value Returned
|
Signals an error if t_string is not a string, or contains ill-formed SKILL expressions. |
Examples
loadstring "1+2"
=> t
loadstring "procedure( f(y) x=x+y )"
=> t
loadstring "x=10\n f 20\n f 30"
=> t
x
=> 60
Related Topics
Return to top