Let's see, for RUN and CLEAR we have so far...
------------------------------------------------------------------------------------------------------------------------------------------------------
STATIC variables and arrays need to be cleared.
VIEW PRINT needs to be restored to default full height.
Keyboard buffer needs to be cleared, including any key pressed after a SLEEP statement to RUN or CLEAR program.
Memory leak needs to be addressed when using either within a sub or function.
LOCATE needs to be restored to DEFAULT values CSRLIN = 1 POS(0) = 1
------------------------------------------------------------------------------------------------------------------------------------------------------
Things I haven't tested or tried before...
MOUSE positions
MOUSE buffer
PALETTE (Probably OK, as COLOR is reset just fine with RUN
------------------------------------------------------------------------------------------------------------------------------------------------------
Things that appear to be reset
OK using RUN are...
COLOR
ON ERROR
------------------------------------------------------------------------------------------------------------------------------------------------------
OK, now here's a weird one you guys will need to decide how to tackle, just for continuity sake...
On the INITIAL run, QB64 determines, for whatever insane reason, not to use the default 80 x 25 screen, so it can accommodate what should be the out-of-bounds LOCATE statement. In other words, it doesn't throw the suspected error 5. QBasic compatibility maybe? Anyway, I think it should open the default screen and throw the error message. So run the program snippet above and initially it will set up a different screen, with enough rows to handle the LOCATE 30 statement, but when you press a key, it encounters RUN and it not use that increased row screen, meaning it will go back to using the default 80 x 25 one, which will throw an error at the LOCATE statement.
IMPORTANT: Guys, don't mess with CLS! In other words, don't make RUN clear the screen. A neat feature using RUN is to pass a foreground color matching background color character or line off characters, and have them read at the start of the program to seed variable(s). That saves the bother of using a data collection file.
Pete
That's all I can remember at the moment, but if I'm missing anything, it's because I haven't coded with it using RUN or it's been too long to figure out what program I had encountered the problem.
Pete
------------------------------------------------------------------------------------------------------------------------------------------------------
Mouse