E
egerds
How do you write code to set up an undetermined number out outer loops
or to properly write a sub to call itself and exit properly?
With known values stored in arrays I am able to manually code the
number for next loops to fill a string that is passed to a sub to xor
properly.
I know how to set up an unknown SQL string but not sure how to code
undetermined number of outer loops.
This would be to create a string with number values
'Example if code has determined number of loops to be 2
Dim bytX1 as Byte, bytX2 as Byte, strToPass as string
For bytX2 = 1 to 54
For bytX1 = bytX2 to 54
'Assign string and call sub code would be here
'Code would be like
strToPass = bytX1 & "," & bytX2
call subwithabovestring(strToPass)
Next bytX1
Next bytX2
'Example if code has determined number of loops to be 7
Dim bytX1 as Byte, bytX2 as Byte, bytX3 as Byte, bytX4 as Byte
Dim bytX5 as Byte bytX6 as Byte, bytX7 as Byte, strToPass as string
For bytX7 = 1 to 54
For bytX6 = bytX7 to 54
For bytX5 = bytX6 to 54
For bytX4 = bytX5 to 54
For bytX3 = bytX4 to 54
For bytX2 = bytX3 to 54
For bytX1 = bytX2 to 54
'Assign string and call sub code would be here
'Code would be like
strToPass = bytX1 & "," & bytX2 & "," & bytX3 & "," & _
bytX4 & "," & bytX5 & "," & bytX6 & "," & bytX7
call subtoEvalTheString(strToPass)
Next bytX1
Next bytX2
Next bytX3
Next bytX4
Next bytX5
Next bytX6
Next bytX7
I have coded the inner loops to not include previous number to reduce
redundant calculations that are passed to the sub
I was thinking of using a do ... loop until but that wouldn't help
setting up the string to pass to the sub.
I have also thought of using goto and return, or recursively calling
the sub to append onto the string but I have code that determines the
number of loops.
or to properly write a sub to call itself and exit properly?
With known values stored in arrays I am able to manually code the
number for next loops to fill a string that is passed to a sub to xor
properly.
I know how to set up an unknown SQL string but not sure how to code
undetermined number of outer loops.
This would be to create a string with number values
'Example if code has determined number of loops to be 2
Dim bytX1 as Byte, bytX2 as Byte, strToPass as string
For bytX2 = 1 to 54
For bytX1 = bytX2 to 54
'Assign string and call sub code would be here
'Code would be like
strToPass = bytX1 & "," & bytX2
call subwithabovestring(strToPass)
Next bytX1
Next bytX2
'Example if code has determined number of loops to be 7
Dim bytX1 as Byte, bytX2 as Byte, bytX3 as Byte, bytX4 as Byte
Dim bytX5 as Byte bytX6 as Byte, bytX7 as Byte, strToPass as string
For bytX7 = 1 to 54
For bytX6 = bytX7 to 54
For bytX5 = bytX6 to 54
For bytX4 = bytX5 to 54
For bytX3 = bytX4 to 54
For bytX2 = bytX3 to 54
For bytX1 = bytX2 to 54
'Assign string and call sub code would be here
'Code would be like
strToPass = bytX1 & "," & bytX2 & "," & bytX3 & "," & _
bytX4 & "," & bytX5 & "," & bytX6 & "," & bytX7
call subtoEvalTheString(strToPass)
Next bytX1
Next bytX2
Next bytX3
Next bytX4
Next bytX5
Next bytX6
Next bytX7
I have coded the inner loops to not include previous number to reduce
redundant calculations that are passed to the sub
I was thinking of using a do ... loop until but that wouldn't help
setting up the string to pass to the sub.
I have also thought of using goto and return, or recursively calling
the sub to append onto the string but I have code that determines the
number of loops.