delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/07/09/03:05:07

From: Erik Max Francis <max AT alcyone DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: void main ?
Date: Mon, 07 Jul 1997 11:16:31 -0700
Organization: Alcyone Systems
Lines: 24
Message-ID: <33C1327F.4FE678F5@alcyone.com>
References: <97Jul7.170831gmt+0100 DOT 16651 AT internet01 DOT amc DOT de>
NNTP-Posting-Host: newton.alcyone.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

Chris Croughton wrote:

> In my experience, only a few programs ever need to
> bother with the exit code, and most of the time you know
> you need to set it (programs designed to be run from make,
> for example).

DOS has builtin (bad) facilities for examining exit codes, and Unix is
built with the indication that every program returns an exit code.  Even
if you were running on a Mac, where the exit code has no meaning, it still
must be included to be ANSI compliant.

> The vast majority of my programs end in
> either return 0 or exit(0) if they exit at all.

True -- but they _must_ do this to be ANSI compliant.

-- 
       Erik Max Francis, &tSftDotIotE / email / max AT alcyone DOT com
                     Alcyone Systems /   web / http://www.alcyone.com/max/
San Jose, California, United States /  icbm / 37 20 07 N  121 53 38 W
                                   \
           "All the gods are dead / except the god of war."
                                 / Eldridge Cleaver

- Raw text -


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