Program termination: Difference between revisions
Content added Content deleted
Line 1,217: | Line 1,217: | ||
''CBTJD'': 2020/03/15<br> |
''CBTJD'': 2020/03/15<br> |
||
There are three commands that can be used to end a program in QB64:<br> |
There are three commands that can be used to end a program in QB64:<br> |
||
1) END - The program will display "Press any key to continue..." and wait for a |
1) END - The program will display "Press any key to continue..." and wait for a key press before closing the program.<br> |
||
2) STOP - The program will close immediately, but will not close any open files. STOP is ONLY used for debugging purposes and should not be used to exit programs!<br> |
2) STOP - The program will close immediately, but will not close any open files. STOP is ONLY used for debugging purposes and should not be used to exit programs!<br> |
||
3) SYSTEM - The ONLY proper command to immediately close a program in QB64 without a pause or interactive message as with the END command.<br> |
3) SYSTEM - The ONLY proper command to immediately close a program in QB64 without a pause or interactive message as in the case with the END command.<br> |
||
<lang qbasic>INPUT "Press any key |
<lang qbasic>INPUT "Press any key...", a$ |
||
IF 1 THEN SYSTEM</lang> |
IF 1 THEN SYSTEM</lang> |
||