[previous] [up] [next]     [contents] [index]
Next: Exceptions and Escape Continuations Up: Evaluation Previous: Multiple Values

Library Functions

Scheme_Object *scheme_eval(Scheme_Object *expr, Scheme_Env *env) 

Evaluates the (uncompiled) S-expression expr in the namespace env.

Scheme_Object *scheme_eval_compiled(Scheme_Object *obj) 

Evaluates the compiled expression obj, which was previously returned from scheme_compile.

Scheme_Object *scheme_eval_compiled_multi(Scheme_Object *obj) 

Evaluates the compiled expression obj, possibly returning multiple values (see section 3.5.3).

Scheme_Object *_scheme_eval_compiled(Scheme_Object *obj) 

Non-top-level version of scheme_eval_compiled. (See section 3.5.1.)

Scheme_Object *_scheme_eval_compiled_multi(Scheme_Object *obj) 

Non-top-level version of scheme_eval_compiled_multi. (See section 3.5.1.)

Scheme_Env *scheme_basic_env() 

Creates the main namespace for an embedded MzScheme. This procedure must be called before other MzScheme library function (except scheme_make_param), and it must only be called once. Extensions to MzScheme cannot call this function.

Scheme_Object *scheme_make_namespace(int argc, Scheme_Object **argv) 

Creates and returns a new namespace. This values can be cast to Scheme_Env *. It can also be installed in a parameterization using scheme_set_param with MZCONFIG_ENV.

When MzScheme is embedded in an application, create the initial namespace with scheme_basic_env before calling this procedure to create new namespaces.

Scheme_Object *scheme_apply(Scheme_Object *f, int c, Scheme_Object **args) 

Applies the procedure f to the given arguments.

Scheme_Object *scheme_apply_multi(Scheme_Object *f, int c, Scheme_Object **args) 

Applies the procedure f to the given arguments, possibly returning multiple values (see section 3.5.3).

Scheme_Object *_scheme_apply(Scheme_Object *f, int c, Scheme_Object **args) 

Non-top-level version of scheme_apply. (See section 3.5.1.)

Scheme_Object *_scheme_apply_multi(Scheme_Object *f, int c, Scheme_Object **args) 

Non-top-level version of scheme_apply_multi. (See section 3.5.1.)

Scheme_Object *scheme_apply_to_list(Scheme_Object *f, Scheme_Object *args) 

Applies the procedure f to the list of arguments in args.

Scheme_Object *scheme_eval_string(char *str, Scheme_Env *env) 

Reads an S-expression from str and evaluates it in the given namespace.

Scheme_Object *scheme_eval_string_all(char *str, Scheme_Env *env, int all) 

Like scheme_eval_string, but if all is not 0, then expressions are read and evaluated from str until the end of the string is reached.

Scheme_Object *scheme_tail_apply(Scheme_Object *f, int n, Scheme_Object **args) 

Applies the procedure as a tail-call. Actually, this function just registers the given application to be invoked when control returns to the evaluation loop. (Hence, this function is only useful within a primitive procedure that is returning to its calle.)

Scheme_Object *scheme_tail_apply_no_copy(Scheme_Object *f, int n, Scheme_Object **args) 

Like scheme_tail_apply, but the array args is not copied. Use this only when args has infinite extent and will not be used again, or when args will certainly not be used again until the called procedure has returned.

Scheme_Object *scheme_tail_apply_to_list(Scheme_Object *f, Scheme_Object *l) 

Applies the procedure as a tail-call.

Scheme_Object *scheme_compile(Scheme_Object *form, Scheme_Env *env) 

Compiles the S-expression form in the given namespace. The returned value can be used with scheme_eval_compiled et al.

Scheme_Object *scheme_expand(Scheme_Object *form, Scheme_Env *env) 

Expands all macros in the S-expression form using the given namespace.

Scheme_Object *scheme_values(int n, Scheme_Object **args) 

Returns the given values together as multiple return values. Unless n is 1, the result will always be scheme_multiple_values.

void scheme_rep() 

Executes a read-eval-print loop, reading from the current input port and writing to the current output port. The current thread's namespace is used for evaluation.


[previous] [up] [next]     [contents] [index]
Next: Exceptions and Escape Continuations Up: Evaluation Previous: Multiple Values

PLT