Node:Executing Scheme code, Next:Defining new Scheme procedures in C, Previous:Error messages, Up:GH
Once you have an interpreter running, you can ask it to evaluate Scheme code. There are two calls that implement this:
SCM gh_eval_str (char *scheme_code) | Function |
This asks the interpreter to evaluate a single string of Scheme code,
and returns the result of the last expression evaluated.
Note that the line of code in scheme_code must be a well formed
Scheme expression. If you have many lines of code before you balance
parentheses, you must either concatenate them into one string, or use
|
SCM gh_eval_file (char *fname) | Function |
SCM gh_load (char *fname) | Function |
gh_eval_file is completely analogous to gh_eval_str() ,
except that a whole file is evaluated instead of a string.
gh_eval_file returns SCM_UNSPECIFIED .
|