ARRAYS

There is support for arrays. The arrays are declared by putting a '*' in
front of the variable name. Space for them can be allocated with the
function 'allocate' or when you use '+', '-' and other operations on
an array, space is allocated by those.

Arrays are stored by reference, so all assignments of whole arrays will
just copy the address. The array will be deallocated when no variable
points to it any longer.

When a variable points to an array (it has to be initialized to do that),
items can be accessed with indexing:
'arr[3]' as an example. The name of the array being indexed can be any
expression, even a function call: 'func()[2]'. It can also be another array,
if this array has pointers to arrays:

arr = allocate(2);
arr[0] = allocate(3);
arr[1] = allocate(3);

or

arr = ({ ({ 0,0,0 }), ({ 0,0,0 }) });     /*  Gives the same as above  */

Now 'arr[1][2]' is a valid value.

The 'sizeof()' function (in true C, not a function) will give the number
of elements in an array (see efun/sizeof).

ARRAY CONSTRUCTOR

Arrays can be constructed with a list inside '({' and '})'. Example:
({ 1, "xx", 2 })
will be construct a new array with size 3, initialized with 1, "xx" and 2
respectively.

See also:  efun/allocate