accessuser1023
Registered User.
- Local time
- Today, 09:43
- Joined
- Nov 12, 2012
- Messages
- 71
all,
I have code that I can't wrap my head around. here it is:
this takes an input array of string and lists permutes. this is the first block of code. what I'm not following is what the last line is checking. I know in general, it's checking to see if there are more indicies captured from the array than there are for values in the array. If there's a mismatch it will exit. so in other words, "aPos(Len(sInput))" is looking for a 0 which indicates that the base 0 array indicies align with the number of array elements that are present.
but I'm not following the math and relation between indicies and the array values that it's evaluating.
anyone done this before? this was code pasted from the web.
any help appreciated. thank you.
I have code that I can't wrap my head around. here it is:
Code:
aPos(1) = aPos(1) + 1
For X = 1 To Len(sInput) - 1
If aPos(X) > Len(sInput) Then
aPos(X) = 1
aPos(X + 1) = aPos(X + 1) + 1
End If
Next X
If aPos(Len(sInput)) > Len(sInput) Then Exit Do
but I'm not following the math and relation between indicies and the array values that it's evaluating.
anyone done this before? this was code pasted from the web.
any help appreciated. thank you.