Program termination: Difference between revisions

Added Quackery.
(→‎{{header|Vlang}}: Rename "Vlang" in "V (Vlang)")
(Added Quackery.)
Line 1,366:
if problem:
os.abort()</syntaxhighlight>
 
=={{header|Quackery}}==
 
<code>out!</code> will cleanly exit Quackery and return control to the calling program. This is demonstrated in the Quackery shell. When <code>10 random</code> returns <code>0</code> Quackery (which in this implementation is a function called from Python3) returns control to Python, which then terminates in the usual fashion and returns control to the zsh, from which we show this to be the case and then re-enter Quackery.
 
<syntaxhighlight lang="Quackery"> [ return$ nest$ size 2 / ]bailby[ ] is out! ( --> )</syntaxhighlight>
 
{{out}}
 
<pre>/O> [ 10 random dup
... iff
... [ echo cr ]
... else
... [ say "Bye-ee!" cr
... drop out! ]
... again ]
...
5
2
5
Bye-ee!
$ echo "$SHELL"
/bin/zsh
$ quackery
 
Welcome to Quackery
 
Enter "leave" to leave the shell.
 
Building extensions.
 
/O> </pre>
 
=={{header|QB64}}==
1,462

edits