Redim()

Redimensions an array whilst keeping the size and contents identical

REDIM [array=Array] i=Integer [j=Integer] [k=Integer][l=Integer] Re-dimensions an array whilst keeping the contents identical

example:

	>> printn a
	[1.0 2.0 3.0 4.0 5.0 ...] Array[400 ] Array(1 )
	>> printn redim(a,20,10,2)
	[1.0 2.0 3.0 4.0 5.0 ...] Array[20 10 2 ] Array(3 )
	>> printn a[1,2,1]
	3.0

Note: Redim will return an error if an attempt is made to change the total size of the array

Redim

The Redim() command is used to re-dimension an array whilst keeping the contents and overall size of the array the same. Arrays in GCL are stored in row major order so that the fastest varying index is on the Right hand side.

Parameters:

Array (Array)

Any valid Open GENIE array type

i, j, k, l (Integer)

Up to four integer indicies for re-dimensioning the array

RESULT = (Array)

Returns the re-dimensioned array