OK i'll try another explanation
Code:
For Variable=0 to 255
Pouet pouet
next
The test is done at the FOR TO NEXT line, the incrementation is done at NEXT line.
So at the end the value=256... wich is really hard to fit in a BYTE variable. Hence it gives 0
Change your var to a WORD too see what's happen now.
Code:
Repeat
Pouet Pouet
Variable = Variable +1
Until Variable = 255
a Repeat Untill loop do the test at the end... so this why it worked
Last edited by mister_e; - 12th October 2006 at 08:25.
Steve
It's not a bug, it's a random feature.
There's no problem, only learning opportunities.
Bookmarks