factor/basis/eval/eval-docs.factor

26 lines
1.2 KiB
Factor
Raw Normal View History

2008-07-28 23:03:13 -04:00
IN: eval
2009-04-15 20:03:44 -04:00
USING: help.markup help.syntax strings io effects ;
2008-07-28 23:03:13 -04:00
HELP: eval
2009-04-15 20:03:44 -04:00
{ $values { "str" string } { "effect" effect } }
{ $description "Parses Factor source code from a string, and calls the resulting quotation, which must have the given stack effect." }
{ $errors "Throws an error if the input is malformed, or if the evaluation itself throws an error." } ;
HELP: eval(
{ $syntax "eval( inputs -- outputs )" }
{ $description "Parses Factor source code from the string at the top of the stack, and calls the resulting quotation, which must have the given stack effect." }
2008-07-28 23:03:13 -04:00
{ $errors "Throws an error if the input is malformed, or if the evaluation itself throws an error." } ;
HELP: eval>string
{ $values { "str" string } { "output" string } }
2009-04-15 20:03:44 -04:00
{ $description "Evaluates the Factor code in " { $snippet "str" } " with " { $link 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." } ;
2008-07-28 23:03:13 -04:00
ARTICLE: "eval" "Evaluating strings at runtime"
2009-01-27 05:11:43 -05:00
"The " { $vocab-link "eval" } " vocabulary implements support for evaluating strings at runtime."
{ $subsections
POSTPONE: eval(
eval>string
} ;
2008-07-28 23:03:13 -04:00
ABOUT: "eval"