Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!

Idiom #198 Abort program execution with error condition

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

import 'dart:io';
exit(x);
#include <stdlib.h>
exit(x);
System.Environment.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);

New implementation...
< >
Bart