Sometimes you will need to add delays in your program.
Let’s assume you wrote a program in Ozapell Basic to draw a white pixel on a black screen in graphics mode:
You run the program and nothing happens. The program executed properly and drew its pixel, but then it returned to text mode when the program ended.
This could also be a problem if a wave audio sound was loaded, played and the program ended. The sound would stop immediately and it might seem as though the sound wasn’t playing correctly.
Here are some delays you can add to the end of your program:
This will create an infinite loop. Only pressing the ESC key will end the program.
This will loop until a key is pressed. INPUT will return a string character in RESULT. If it is an empty string (length of zero), the loop will continue. If a key is pressed (associated with a string character), then the loop will end.
This will loop for 1000 milliseconds (one second).