Logo

Programming-Idioms

Abort program execution with error condition x (where x is an integer value)
New implementation

Be concise.

Be useful.

All contributions dictatorially edited by webmasters to match personal tastes.

Please do not paste any copyright violating material.

Please try to avoid dependencies to third-party libraries and frameworks.

Other implementations
#include <stdlib.h>
exit(x);
System.Environment.Exit(x);
import 'dart:io';
exit(x);
STOP 1
import "os"
os.Exit(x)
import System.Exit (exitWith, ExitFailure)
exitWith (ExitFailure 4)
process.exit(x);
System.exit(x);
os.exit(x)
exit($x);
Runerror(x);
exit $x;
import sys
sys.exit(x)
exit x
use std::process;
process::exit(x);