If Array is a compound term, a local array of type Type is created, its dimension is the arity of the term Array and the size of each dimension is specified by the corresponding argument of the term Array. The sizes must be greater than 0, Type must not be global_reference.
The elements of Prolog arrays are initialised depending on the type: float, integer, byte and global_reference arrays are initialised with 0 values, prolog arrays are initialised with free variables.
The valid elements indexes in the array range from 0 to the dimension minus one. For example myarray created with make_array(myarray(3,4,5), integer) contains 60 integers that may be accessed from myarray(0,0,0) to myarray(2,3,4).
Typed array use less space that untyped (i.e. prolog) ones.
Global references access the original term with is variables, other array types store a copy of the term.
Success: make_array(a, prolog). make_array(a(1), integer). make_array(a(4), prolog). make_array(b(2,3), float). make_array(a(2), float), make_array(a(3,2), byte). Error: make_array(a(7), X). (Error 4). make_array(a(6.0), float). (Error 5). make_array(a(0), float). (Error 6). make_array(a(2), atom). (Error 6). make_array(a(4), float), make_array(a(5), byte). (Error 42).