[previous] [up] [next]     [contents] [index]
Next: Library Functions Up: MzScheme Architecture Previous: Library Functions

Structures

A new Scheme structure type is created with scheme_make_struct_type. This creates the structure type, but does not generate the constructor, etc. procedures. The scheme_make_struct_values function takes a structure type and creates these procedures. The scheme_make_struct_names function generates the standard structure procvedures names given the structure type's name. INstances of a structure type are created with scheme_make_struct_instance and the function scheme_is_struct_instance tests a structure's type.

The the structure procedure values and names generated by scheme_make_struct_values and scheme_make_struct_names can be restricted by passing any combination of these flags:

When all values or names are returned, they are returned as an array with the following order: structure type, constructor, predicate, first selector, first mutator, second selector, etc. When particular values/names are omitted, the array is compressed accordingly.





PLT