next up previous contents index
Next: Objects Up: Objects and structures Previous: Objects and structures   Contents   Index


Object types

The object types are structures of the following type :

typedef struct TYPE_OBJET {
     int            type;
     int            nombre;
     int            nbdim;
     char         **nom_dim;
     char          *nom;
     char          *comment;
} obj_typ;

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

type is the type of variables contained in the arrays :

- type 0 is for integers,

- type 1 for real numbers in simple precision,

- type 2 for real numbers in double precision,

- type 3 for complex numbers in simple precision $x+iy$.

- type 4 for complex numbers in double precision $x+iy$.

- type 5 for complex numbers in simple precision $re^{i\theta}$.

- type 6 for complex numbers in double precision $re^{i\theta}$.

The way complex numbers are represented is explained in 13. There is an extra possible type : type 7 (undetermined type, cf. 6.5).

nombre is the maximal number of objects of this type that will be allowed.

nbdim is the number of dimensions of the arrays. It is at least 1.

nom_dim[i] will be the name of the i-th dimension of the arrays. When the objects will be created, their dimensions will be fixed using hidden variables having these names which are known by the expression evaluator.

nom is the name of the command of the interpreter that is used to create objects 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 that have been created.


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