next up previous contents index
Next: Structures Up: Objects and structures Previous: Storage of objects   Contents   Index


Structure types

The structure types are structures of the following type :

typedef struct TYPE_STRUC {
     int            nb_membres;
     int           *type_mb;
     char         **membre_id;
     char          *nom;
     char          *comment;
     int            nombre;
} struc_typ;

This structure is not supposed to be used by anything except the interpreter itself. The user of the interpreter will have to manipulate structures rather than structure types.

nb_membres is the number of members of the structure type.

type_mb contains the types of the members. If the member i is an object of type j, type_mb[i] will be j. If this member is a structure of type j then type_mb[i] will be -j-1. If the member i is a variable of the expression evaluator then type_mb[i] will be 0. Structure types are determined by their order in the initialization file (cf. 3.6). The first to be defined has type 0, the second 1, and so on. An object or structure type must be defined before it appears as a member of another structure type.

membre_id contains the names of the members.

nom is the name of the command of the interpreter that is used to create structures of this type.

comment is a description of the object. It is used only by the command list which gives the list of all the objects and structures that have been created.


next up previous contents index
Next: Structures Up: Objects and structures Previous: Storage of objects   Contents   Index
2009-11-12