And you just corrupted your program’s data!
At the start of the program, (which we haven’t shared yet on the forums), was:
DIM X AS _UNSIGNED _BYTE, Y AS _UNSIGNED _BYTE, Wide AS _UNSIGNED _BYTE, High AS _UNSIGNED _BYTE
Wide = 250: High = 250
You just overflowed X/Y!!
LOL! Don’t pay me any real attention; I’m just messing with you. (Though you may actually have these sort of issues if the code becomes part of a library which others might $INCLUDE into their code.)
Really, I was just illustrating why an EXIT statement might not be a “bad coding practice”, and might instead be the most elegant solution to a problem. I think we’ve showed that here, and I thank you for playing along and helping me highlight my point so nicely.
There’s nothing in the world wrong with using an EXIT (or even judiciously using a GOTO in limited situations). You just don’t want to rely on them so much so that your code spaghettifies and becomes unreadable and impossible to follow the flow and intent of it. ;D