Hi,
This small piece of code about loops confuses me. I understand everything else, except the order why it prints out 1,1 , 1,2 , 1,3 , 1,4 , 2,1 , 2,2 etc. If someone could cut the code to pieces, why it only adds the j-parametre to a higher number, when it's running the 1,1 , 1,2-cycle. I can understand that when the j-parametre reaches 4, it adds one to k and starts that 2,1 , 2,2-thing.
Strict
Local k,j
#Labell
For k=1 To 4
#Label2
For j=1 To 4
Print k+ "," +j
If k=3 Exit Labell
Next
Next
Hopefully I didn't write too confusingly.
This small piece of code about loops confuses me. I understand everything else, except the order why it prints out 1,1 , 1,2 , 1,3 , 1,4 , 2,1 , 2,2 etc. If someone could cut the code to pieces, why it only adds the j-parametre to a higher number, when it's running the 1,1 , 1,2-cycle. I can understand that when the j-parametre reaches 4, it adds one to k and starts that 2,1 , 2,2-thing.
Strict
Local k,j
#Labell
For k=1 To 4
#Label2
For j=1 To 4
Print k+ "," +j
If k=3 Exit Labell
Next
Next
Hopefully I didn't write too confusingly.