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 expression (as a Scheme_Object *) and an environment and returns the value of the expression in that environment.

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.

 scheme_eval actually calls  scheme_compile followed by  scheme_eval_compiled. The distinction between compiled and uncompiled expressions is important only for programmers adding new syntax to MzScheme.





PLT