Program termination
![Task](http://static.miraheze.org/rosettacodewiki/thumb/b/ba/Rcode-button-task-crushed.png/64px-Rcode-button-task-crushed.png)
You are encouraged to solve this task according to the task description, using any language you may know.
Show the syntax for a complete stoppage of a program inside a conditional. This includes all threads/processes running under your program.
BASIC
<qbasic>if problem = 1 then
end
end if</qbasic>
C
<c>#include <stdlib.h>
if(problem){
exit(integerErrorCode); /*conventionally, error code 0 is the code for "OK", while anything else is an actual problem*/ /*optionally: return the integerErrorCode from the main() function*/
}</c>
Java
<java>if(problem){
System.exit(integerErrorCode); //conventionally, error code 0 is the code for "OK", while anything else is an actual problem //optionally: Runtime.getRuntime().exit(integerErrorCode);
}</java>
OCaml
<ocaml>if problem then
exit integerErrorCode (*conventionally, error code 0 is the code for "OK",while anything else is an actual problem*)</ocaml>
Perl
<perl>if ($problem) {
exit integerErrorCode; #conventionally, error code 0 is the code for "OK" (you can also omit the argument in this case) #while anything else is an actual problem
}</perl>
Python
<python>if problem:
sys.exit(integerErrorCode) #conventionally, error code 0 is the code for "OK" (you can also omit the argument in this case) #while anything else is an actual problem</python>