nidification of for..next cicle work or not ?

gecomail

Member
Licensed User
Hi, i have use 2 for next cicle, the second inside the first like this :

For a=0 to 100
for b=0 to 200
r=msgbox("pippo")
next b
next a

this code run but not execute the second for.....next
i would like to know if i write a bad code or why this code not work good.
thank all.:sign0085:
 

klaus

Expert
Licensed User
It's strange, on my computer it works.

But anyway, in B4PPC the code should be:
B4X:
For a=0 to 100
  For b=0 to 200
    r=msgbox("pippo")
  Next
Next
No variable after the Next keyword !

Best regards.
 
Top