Logo

Programming-Idioms

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

Idiom #198 Abort program execution with error condition

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

#include <stdlib.h>
exit(x);

Calls all functions registered with atexit, then flushes and closes all streams and finally terminates the process.
System.Environment.Exit(x);

New implementation...
< >
Bart