just stop program

div0 div0 at sourceforge.net
Fri Nov 5 02:47:37 PDT 2010

On 05/11/2010 09:32, spir wrote:
> Hello,
> Is there a way for a program to simply exit before end of main()? An instruction like exit, quit, end, halt, stop...
> [assert(false) is not why I'm looking for, as (1) the compiler protests if there is unreachable code (2) it throws in non-release mode. I just want the program to stop, basta! My use case is first debugging (avoid later debug output to be written on terminal).]
> Denis
> -- -- -- -- -- -- --
> vit esse estrany ☣
> spir.wikidot.com

import std.c.process

then you've exit(int) & abort()

You can get access to most C library functions through std.c.*,
so it's always worth a quick check in there for lower level stuff.

My enormous talent is exceeded only by my outrageous laziness.

More information about the Digitalmars-d-learn mailing list