Displaying  Source Code(s)  
 

 
RevArray Function - Reverse the order of an array

--------------------------------------------------------------------------------

Description : The RevArray function reverses the order of an array. In other words, the upperbound value of an input array will become the lowerbound value and all other values will re-order themselves accordingly. RevArray returns an array.

<%
Private Function RevArray(ByVal arrayinput)
Dim i, ubnd
Dim newarray()
ubnd = UBound( arrayinput )
ReDim newarray(ubnd)
For i = 0 To UBound( arrayinput )
newarray( ubnd - i ) = arrayinput( i )
Next
RevArray = newarray
End Function
%

 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved © copyright 123ENG