Type Sized For Loops

BlitzMax Forums/BlitzMax Programming/Type Sized For Loops

The forum is locked. These are the original blitzbasic.com forums, kept so they can still be read. No new topics, replies or edits can be made here. To join in, head over to the Blitz3D+ forums.

Unfortunately, this is due to the limits imposed by shorts and bytes. My advice? Use an int. There's no benefit to using it over a short or byte since for most operations they'll be converted to an int and then converted back to a byte when the operations are finished.

In this case it's like:
For i@ = 0 To 255
-Convert to int
-Increment
-Convert to byte
-Compare
Next