eval>string ( str -- output )
Factor handbook » The implementation » The parser » Evaluating strings at run time

Prev:Evaluating strings with a different vocabulary search path


Vocabulary
eval

Inputs
stra string


Outputs
outputa string


Word description
Evaluates the Factor code in str with output-stream rebound to a string output stream, then outputs the resulting string. The code in the string must not take or leave any values on the stack.

Errors
If the code throws an error, the error is caught, and the result of calling print-error on the error is returned.

Definition