All pastes #941928 Raw Edit

Mine

public text v1 · immutable
·published 2008-03-14 01:56 UTC
rendered paste body
#macro Resize_Array_4D(_Array, Array, NewSize)   BeginMacro2p("Resize_Array_4D",_Array, NewSize) //for debugging   #local NewArray = array[NewSize][dsz(Array, 2)][dsz(Array, 3)][dsz(Array, 4)];   #local A = 0;   #local B = 0;   #local C = 0;   #local D = 0;   #local Max = min(NewSize, dsz(Array, 1));   #while (A < Max)      #local B = 0;      #while (B < dsz(Array, 2))         #local C = 0;         #while (C < dsz(Array, 3))            #local D = 0;            #while (D < dsz(Array, 4))               #ifdef (Array[A][B][C][D])                  #declare NewArray[A][B][C][D]=Array[A][B][C][D];               #end//ifdef               #local D=D+1;            #end//while (D)            #local C=C+1;         #end//while (C)         #local B=B+1;      #end //while (B)      #local A=A+1;   #end //while (A)   #declare Array = NewArray;   //EndMacro("Resize_Array_4D")#end