Hi Folks. In tinkering with the RANDOM function, I have found that the results I've produced with the simulator seem to be at variance with the detail on p.177 of the Manual.
I used the following listing :
main: ;08M2, Editor 5.5.5, XP platform ( I'm more comfortable with PE5 than 6)
random w0
w1=w1+1 ; cycle counter
if b0 <= 50 then high c.0 stop endif
goto main
This program produces a different sequence of numbers each time it is simulated, where the Manual, for quite logical reasons, states that the same sequence should be generated on each cycle. The program stops and c.0 lights when the random number generated is =< 50, executes a different number of cycles between each iteration, and produces a different value each time. . It seems unnecessary therefore, to change the seed as in the examples listed.
On the basis that the Manual is right and I am wrong, I would be interested in the comments of someone more experienced than I, in unravelling this mystery.
Thanks
Ben Baker
I used the following listing :
main: ;08M2, Editor 5.5.5, XP platform ( I'm more comfortable with PE5 than 6)
random w0
w1=w1+1 ; cycle counter
if b0 <= 50 then high c.0 stop endif
goto main
This program produces a different sequence of numbers each time it is simulated, where the Manual, for quite logical reasons, states that the same sequence should be generated on each cycle. The program stops and c.0 lights when the random number generated is =< 50, executes a different number of cycles between each iteration, and produces a different value each time. . It seems unnecessary therefore, to change the seed as in the examples listed.
On the basis that the Manual is right and I am wrong, I would be interested in the comments of someone more experienced than I, in unravelling this mystery.
Thanks
Ben Baker