Question
Is:
For i = LBound(arr) To UBound(arr)
The best way?
What is the point in asking for LBound? Surely that is always 0 isn't it?
Answer
Why not use For Each? That way you don't need to care what the LBound and UBound are.
Dim x, y, z
x = Array(1, 2, 3)
For Each y In x
z = DoSomethingWith(y)
Next
< br > via < a class="StackLink" href=" http://stackoverflow.com/questions/2348/" >What is the best way to iterate through an array in Classic Asp VBScript?< /a>
0 comments:
Post a Comment