www.digitalmars.com         C & C++   DMDScript  

digitalmars.D - how to terminate a program

reply james <james google.com> writes:
how to terminate the program in the middle of execution, is there any command
such as halt,exit? since i dont use exception for error handling.
Oct 24 2008
parent reply dsimcha <dsimcha yahoo.com> writes:
== Quote from james (james google.com)'s article
 how to terminate the program in the middle of execution, is there any command

Use C's. It's in std.c.stdlib. It's called exit, takes an int and returns the exit code provided by the caller to the OS upon termination.
Oct 24 2008
parent james <james google.com> writes:
dsimcha Wrote:

 == Quote from james (james google.com)'s article
 how to terminate the program in the middle of execution, is there any command

Use C's. It's in std.c.stdlib. It's called exit, takes an int and returns the exit code provided by the caller to the OS upon termination.

thank you very much. it works.
Oct 24 2008