01-07-2023, 06:29 AM
"SLEEP" doesn't wait the full length given if a key is pressed. However, "_DELAY" to stick things up for longer than a few seconds could irritate the user running your program. A compromise is to run a loop, say you want to pause for 10 seconds. Do "_DELAY 1" and then check for keypress, per loop pass, to break out of the loop. Specifically check for escape key if you require it, otherwise for a lengthy pause, it should at least display a message to the user so he/she doesn't feel like an MMORPG's eternity.
Be careful when using "_DISPLAY". Don't forget that after showing a lot of stuff on screen, such as doing animations and while it's highly important to get the attention of the user using your program, you place "_AUTODISPLAY". Otherwise some things aren't going to be displayed which is bothersome. The first "_DISPLAY" statement encountered in the code automatically switches to "update only when I'm asked to, not when the system asks me to". So it's easy to forget to change it back to "_AUTODISPLAY".
Be careful when using "_DISPLAY". Don't forget that after showing a lot of stuff on screen, such as doing animations and while it's highly important to get the attention of the user using your program, you place "_AUTODISPLAY". Otherwise some things aren't going to be displayed which is bothersome. The first "_DISPLAY" statement encountered in the code automatically switches to "update only when I'm asked to, not when the system asks me to". So it's easy to forget to change it back to "_AUTODISPLAY".