in array.inc
//--------------------------------------
#macro Reverse_Array(Array)
#local J = 0;
#local N = dimension_size(Array, 1);
#while(J < floor(N/2))
#local Temp = Array[J]
#local Array[J] = Array[N-J] //<-- subscipt out of range
#local Array[N-J] = Temp //<-- subscipt out of range
#local J = J + 1;
#end
#end
//-----REVISION--------------------------------
#macro Reverse_Array(Array)
#local J = 0;
#local N = dimension_size(Array, 1);
#while(J < floor(N/2))
#local Temp = Array[J]
#local Array[J] = Array[N-J-1] //<---Correction--
#local Array[N-J-1] = Temp //<-----Correction--
#local J = J + 1;
#end
#end
//--------------------------------------------------------
--
Martial
http://martial.rameaux.free.fr
http://www.cathemline.org
Post a reply to this message
|