Hi,
Sayzer wrote:
Why is that?1. In your code above, you have the following.
Code:
IF W0 < 13105 Then loop1
IF W0 < 26210 Then loop2
IF W0 < 39315 Then loop3
IF W0 < 52420 Then loop4
IF W0 <= 65525 Then loop5
Lets take W0=10000 then all of these IF statements will be true and be executed. Or say W0=28000; in this case last three IF statements will be executed, etc...
If W0=10000 the first IF statement tests true and the program jumps to the Loop1 routine which is executed. At the end of Loop1 the program jumps to Test where a new RANDOM is executed and assigned to W0. Lets say it's 28000 as in you example. The third statement tests true and the program jumps to Loop3, executes it and then starts over with another RANDOM. At least that's how I read it.
HTH
/Henrik Olsson.
Bookmarks