previous up next     contents index
Next: Procedures Up: Scheme Environments Previous: Scheme Environments

Library Functions

 
void   scheme_add_global(char *name, Scheme_Object *val, Scheme_Env *env) 

Adds a value to the table of globals for the environment env.

 
void   scheme_add_global_symbol(Scheme_Object *name, Scheme_Object *val, Scheme_Env *env) 

Adds a value to the table of globals by symbol instead of name.

 
void   scheme_add_global_constant(char *name, Scheme_Object *v, Scheme_Env *env) 

Like scheme_add_global, but the global variable name is also made constant if builtin-constants are enabled, and #%name is also defined as a constant.

 
void   scheme_add_global_keyword(char *name, Scheme_Object *v, Scheme_Env *env) 

Like scheme_add_global, but the global variable name is also made constant and a keyword (unless keywords are disabled).

 
void   scheme_remove_global(char *name, Scheme_Env *env) 

Removes the variable binding from the table of globals for the environment env. Constant globals cannot be removed.

 
void   scheme_remove_global_symbol(Scheme_Object *name, Scheme_Env *env) 

Removes a variable binding from the table of globals by symbol instead of by name.

 
void   scheme_remove_global_constant(char *name, Scheme_Env *env) 

Undefines name and also #%name. The latter is undefined despite its constantness.

 
void   scheme_constant(Scheme_Object *sym, Scheme_Env *env) 

Declares the given global variable name (given as a symbol) to be constant in the table of globals for the environment env.

 
void   scheme_set_keyword(Scheme_Object *sym, Scheme_Env *env) 

Declares the given symbol to be a keyword in the environment env.

 
Scheme_Object *  scheme_lookup_value(Scheme_Object *sd, Scheme_Env *env) 

Given static-distance coordinates in sd, finds the value in the run-time environment env.

 
Scheme_Object *  scheme_lookup_global(Scheme_Object *symbol, Scheme_Env *env) 

Given a global variable name (as a symbol) in sym, returns the current value.

 
Scheme_Bucket *  scheme_global_bucket( Scheme_Object *symbol, Scheme_Env *env) 

Given a global variable name (as a symbol) in sym, returns the bucket where the value is stored. When the value in this bucket is NULL, then the global variable is undefined.

The  Scheme_Bucket structure is defined as:

  typedef struct Scheme_Bucket {
    Scheme_Type type; /* = scheme_variable_type */
    void *key;
    void *val;
  } Scheme_Bucket;

 
Scheme_Config *  scheme_env_config(Scheme_Env *env) 

Returns the configuration record for the given environment. See section 3.7.1 for more information.


previous up next     contents index
Next: Procedures Up: Scheme Environments Previous: Scheme Environments

PLT