delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/12/29/12:56:57

Message-Id: <m0xmdlx-000S28C@inti.gov.ar>
Comments: Authenticated sender is <salvador AT natacha DOT inti DOT gov DOT ar>
From: "Salvador Eduardo Tropea (SET)" <salvador AT inti DOT gov DOT ar>
Organization: INTI
To: rdm AT inlink DOT com, djgpp AT delorie DOT com
Date: Mon, 29 Dec 1997 14:57:52 +0000
MIME-Version: 1.0
Subject: Re: Begginer problems with C & DJGPP
In-reply-to: <34A7D31D.434B5D15@IHateSpam.com>

Ryan McGee <rdm AT IHateSpam DOT com> wrote:

> why is useing void main() a bad idea?  I've heard that all over the place
> but nobody tells me why I shouldn't do that.  Does it have something to do
> with error checking?  What's going to check the return value of main?
If your program is called by other it WILL check this value. For example: if 
it's called from make it will stop the process because it will return error 
(most probable).
As main DOES return int you must declare it or the return value is random. 
Normally nothing will happend but is a bad practice.

SET
------------------------------------ 0 --------------------------------
Visit my home page: http://set-soft.home.ml.org/
or
Salvador Eduardo Tropea (SET). (Electronics Engineer)
Alternative e-mail: set-sot AT usa DOT net - ICQ: 2951574
Address: Curapaligue 2124, Caseros, 3 de Febrero
Buenos Aires, (1678), ARGENTINA
TE: +(541) 759 0013

- Raw text -


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