A new Picaxe bug?

lanternfish

Senior Member
Was in the forums on Letsmakerobots where I saw this discussion:

http://letsmakerobots.com/node/7723

Basically, there appears to be a bug with for ... next loops where large word values are used.

#picaxe40x2
#no_data
high 5
for w0 = 1 to 65535 next w0
high 6
for w0 = 0 to 65535 next w0
high 7
You can replace #picaxe40x2 with whatever flavour Picaxe you want.

In the Programming Editor, when w0 reaches 32768 the programme appears to stop.

Any thoughts?

Cheers
 

Technical

Technical Support
Staff member
This is an integer overflow bug in the 'next' command simulation in the Programming Editor which we have now fixed for the next release, thanks for letting us know. The real chip will work fine.
 
Top