|
Recursive
Routine
<%@ Language=VBScript %>
<% option explicit %>
<%
Sub ucaseArray(sArr, istart, iend)
If istart <= iend Then
sArr(istart) = ucase(sArr(istart))
istart = istart + 1
Call ucaseArray(sArr, istart, iend)
End If
End Sub
Dim i
Dim istart
Dim iend
Dim sArr
sArr = Array("one", "two", "three")
Response.Write "The original array is :<br>"
For i = lbound(sArr) to ubound(sArr)
Response.Write sArr(i) & "<br>"
Next
Response.Write "<p>"
Response.Write "Change all of the items to upper case<br>"
Call ucaseArray(sArr, lbound(sArr), ubound(sArr))
For i = lbound(sArr) to ubound(sArr)
Response.Write sArr(i) & "<br>"
Next
Response.Write "<p>"
Response.Write "Change only the item at position1 to upper case<br>"
sArr = Array("one", "two", "three")
Call ucaseArray(sArr,1,1)
for i=lbound(sArr) to ubound(sArr)
Response.write sArr(i) & "<br>"
Next
%>
|