Program termination: Difference between revisions
Content added Content deleted
(→Joy: add) |
(add RPL) |
||
Line 1,514: | Line 1,514: | ||
next |
next |
||
</syntaxhighlight> |
</syntaxhighlight> |
||
=={{header|RPL}}== |
|||
There are 2 ways of terminating a program in RPL. |
|||
'''IF''' problem '''THEN''' HALT '''END''' |
|||
Here, nothing is cleaned up: local variables are still existing and a step-by-step execution is possible thanks to the <code>SST</code> instruction, typically for debugging. Once the bug found, a manual cleanup must be done through the <code>KILL</code> instruction. |
|||
If a full termination with cleanup is desired, it must be written: |
|||
'''IF''' problem '''THEN''' ABORT '''END''' |
|||
All currently running processes are then terminated, all local variables are discarded and control is given back to the user. |
|||
=={{header|Ruby}}== |
=={{header|Ruby}}== |