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.
- C
- C
- C
- Clojure
- Cobol
- C++
- C#
- D
- Dart
- Elixir
- Erlang
- Fortran
- Go
- Haskell
- JS
- Java
- Java
- Java
- Kotlin
- Lisp
- Lua
- Lua
- PHP
- PHP
- Pascal
- Perl
- Python
- Ruby
- Rust
- Scheme
- VB
return 0;
Only works in main(), actually.
abort();
Terminates the process immediatly, without executing exit handlers or flushing streams.
IDENTIFICATION DIVISION.
PROGRAM-ID. date format.
PROCEDURE DIVISION.
STOP RUN.
exit(1);
The behavior of exit() is pretty complicated, but idtors will be called.
Environment.Exit(0)
erlang:halt(0).
0_ means normal termination. Any other integer will result in that value being the exit status of the program.
A string will crash the vm and generate a crash report with that as the slogan.
The atom abort will cause the runtime system to abort, if that's allowed
For integer Status the Erlang runtime system closes all ports and allows async threads to finish their operations before exiting. To exit without such flushing use you can use
erlang:halt( Status, [{flush, false}]).
A string will crash the vm and generate a crash report with that as the slogan.
The atom abort will cause the runtime system to abort, if that's allowed
For integer Status the Erlang runtime system closes all ports and allows async threads to finish their operations before exiting. To exit without such flushing use you can use
erlang:halt( Status, [{flush, false}]).
stop
process.exit()
throw new RuntimeException();
System.exit(0);
This stops the whole JVM.
Status code 0 means "normal termination".
Status code 0 means "normal termination".
throw new Error();
(exit)
os.exit()
return
Only works in main function.
die();
exit();
halt(0);
halt(error_code);
0 for no error.
0 for no error.
exit 0;
The zero is the return code to the OS.
exit
Just prior to termination, Ruby executes any at_exit functions and runs any object finalizers.
(exit)
Checked on: Racket, Guile.
End()