I have this piece of pseudocode that I wish to convert to asp:
--------------------------------------------------
<<< pointer to increment array >>>
arrayinc=0
dim extarray(50)
While not rsFiles.EOF
<<< finds the file extension >>>
file = rsFiles("FileName"
rtn = InStr(1,file, "."
if rtn > 0 then
extension = Right(file, (Len(file)-rtn+1))
end if
for l=1 to howmanyrecs
<<< if extension tyoe already in array then exit loop >>>
if extArray(l) = extension then
exit-loop <<< code to exit the loop >>>
else
<<< otherwise add extension to array >>>
arrayinc= arrayinc+1
extArray(arrayinc)= extension
exit-loop <<< code to exit the loop >>>
end if
next l
rsFiles.MoveNext
wend
--------------------------------------------------
could someone plz correct it and add the code that will exit the loop. The codes meant to check if a string called "extension" is in the array, if it is it should break out of the loop otherwise it should add the string to the array.
Grateful for any help, Thanks.
--------------------------------------------------
<<< pointer to increment array >>>
arrayinc=0
dim extarray(50)
While not rsFiles.EOF
<<< finds the file extension >>>
file = rsFiles("FileName"
rtn = InStr(1,file, "."
if rtn > 0 then
extension = Right(file, (Len(file)-rtn+1))
end if
for l=1 to howmanyrecs
<<< if extension tyoe already in array then exit loop >>>
if extArray(l) = extension then
exit-loop <<< code to exit the loop >>>
else
<<< otherwise add extension to array >>>
arrayinc= arrayinc+1
extArray(arrayinc)= extension
exit-loop <<< code to exit the loop >>>
end if
next l
rsFiles.MoveNext
wend
--------------------------------------------------
could someone plz correct it and add the code that will exit the loop. The codes meant to check if a string called "extension" is in the array, if it is it should break out of the loop otherwise it should add the string to the array.
Grateful for any help, Thanks.