how to terminate a program

Jonathan M Davis newsgroup.d at jmdavisprog.com
Sun Sep 15 03:54:01 UTC 2019


On Saturday, September 14, 2019 9:37:37 PM MDT Murilo via Digitalmars-d 
wrote:
> On Saturday, 25 October 2008 at 01:41:09 UTC, dsimcha wrote:
> > == Quote from james (james at google.com)'s article
> >
> >> 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.
> >
> > 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.
>
> Hi, I am trying it but my compiler does not find the std.c.stdlib
> module. I am using one of the latest versions. Has it been
> removed?

You're replying to a post that's nearly 11 years old. The C bindings were
moved to druntime quite some time ago. The bindings for C's standard library
are in the package core.stdc. So, the bindings for C's stdlib header are in
core.stdc.stdlib.

- Jonathan M Davis





More information about the Digitalmars-d mailing list