CONTENTS | PREV | NEXT
8D. the array type (ARRAY)
ARRAYs are declared by specifying their length (in elements):
this defines an array of 100 bytes. Internally, 'b' is a variable of
type LONG and a PTR to this memory area.
Default type of an array-element is CHAR, it may be anything by specifying:
DEF x:ARRAY OF LONG
DEF mymenus:ARRAY OF newmenu
where "newmenu" is an example of a structure, called OBJECTs in E.
Array access is very easy with: <var>[<sexp>]
Note that the index of an array of size n ranges from 0 to n-1,
and not from 1 to n.
Note that ARRAY OF <type> is compatible with PTR TO <type>, with the
only difference that the variable that is an ARRAY is already