(eval) ( str effect -- )
Factor handbook » The implementation » The parser » Evaluating strings at run time » Evaluating strings with a different vocabulary search path

Next:with-file-vocabs ( quot -- )


Vocabulary
eval

Inputs
stra string
effectan effect


Outputs
None

Word description
Parses Factor source code from a string, and calls the resulting quotation, which must have the given stack effect.

Notes
This word must be wrapped within with-file-vocabs or with-interactive-vocabs, since it assumes that the manifest variable is set in the current dynamic scope.

Errors
Throws an error if the input is malformed, or if the evaluation itself throws an error.

Definition