[previous] [up] [next]     [contents] [index]
Next: Top-level Evaluation Functions Up: MzScheme Architecture Previous: Library Functions

Evaluation

A Scheme S-expression is evaluated by calling scheme_eval. This function takes an S-expression (as a Scheme_Object *) and a namespace and returns the value of the expression in that namespace.

The function scheme_apply takes a Scheme_Object * that is a procedure, the number of arguments to pass to the procedure, and an array of Scheme_Object * arguments. The return value is the result of the application. There is also a function scheme_apply_to_list, which takes a procedure and a list (constructed with scheme_make_pair) and performs the Scheme apply operation.

The scheme_eval function actually calls scheme_compile followed by scheme_eval_compiled.





PLT