delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1998/08/18/02:45:57

From: Bjorn Hansen <viking AT xyz DOT net>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: 2 quick questions
Date: Fri, 14 Aug 1998 22:08:05 -0800
Organization: ISPNews http://ispnews.com
Lines: 20
Message-ID: <35D525C5.9B79BFB@xyz.net>
References: <35D4F001 DOT 4A3E2B2D AT xyz DOT net> <35D4F431 DOT F5D956B8 AT cs DOT net>
NNTP-Posting-Host: hom-1-2.xyz.net
Mime-Version: 1.0
NNTP-Posting-Date: 15 Aug 1998 06:10:11 GMT
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp


John M. Aldrich wrote:

> Bjorn Hansen wrote:
> >
> > 1]  what does the exit code tell you?
>   It is a standard convention to use the exit code to indicate if a
> program ran successfully.  Programs written according to this convention
> return a zero exit code if they ran correctly, and a non-zero exit code
> to indicate some form of failure.

My programs that are successful often return a different exit code.  When
they fail I think they usually return 255.  I don't put anything like
return(0); at the end.  should I do this?  Is there anything else an exit
code tells you besides if the program was successful.  It seems like it must
since it does not just return a 0 or a 1.

Bjorn Hansen

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019