Original Author Paul Laughton, 2011
Page 42
De Re BASIC!
The dimensions of the Source[] array are written to the Dims[] array, if you provide one. The Dims[]
parameter must be a numeric array name with nothing in the brackets ("[]"). If the Dims[] array exists, it
is overwritten. Otherwise a new array is created. The result is always a one-dimensional array.
The number of dimensions of the Source[] array is written to the NumDims parameter, if you provide
one. NumDims must be a numeric variable. This value is the length of the Dims[] array.
Array.fill Array[{<start>,<length>}], <exp>
Fills an existing array or array segment with a value. The types of the array and value must match.
Array.length <length_nvar>, Array[{<start>,<length>}]
Places the number of elements in an entire array (Array[] or Array$[]) or an array segment
(Array[start,length] or Array$[start,length]) into <Length_nvar>.
Array.load Array[], <exp>, ...
Creates a new array, evaluates the list of expressions "<exp>, ...", and loads values into the new array.
Specify the array name with no index(es). The array has one dimension; its size is the same as the
number of expressions in the list. If the named array already exists, it is overwritten.
The array may be numeric (Array[]) or string (Array$[]), and the expressions must be the same type as
the array.
The list of expressions may be continued onto the next line by ending the line with the "~" character.
The "~" character may be used between <exp> parameters, where a comma would normally appear.
The "~" itself separates the parameters; the comma is optional.
The "~" character may not be used to split a parameter across multiple lines.
Examples:
Array.load Numbers[], 2, 4, 8 , n^2, 32
Array.load Hours[], 3, 4,7,0, 99, 3, 66~ % comma not required before ~
37, 66, 43, 83,~
% comma is allowed before ~
83, n*5, q/2 +j
Array.load Letters$[], "a", "b","c",d$,"e"
Array.max <Max_nvar> Array[{<start>,<length>}]
Finds the maximum value in a numeric array (Array[]) or array segment (Array[start,length]), and places
the result into the numeric variable <max_nvar>.
Array.min <Min_nvar>, Array[{<start>,<length>}]
Finds the minimum value in a numeric array (Array[]) or array segment (Array[start,length]), and places
the result into the numeric variable <min_nvar>.