www.delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1996/08/02/12:35:26

Date: Sat, 3 Aug 1996 00:35:02 +0800 (GMT)
From: Orlando Andico <orly AT gibson DOT eee DOT upd DOT edu DOT ph>
To: kagel AT quasar DOT bloomberg DOT com
cc: j DOT aldrich6 AT genie DOT com, djgpp AT delorie DOT com
Subject: Re: Compile Errors
In-Reply-To: <9608021406.AA05467@quasar.bloomberg.com >
Message-ID: <Pine.SGI.3.93.960803003319.678A-100000@gibson.eee.upd.edu.ph>
MIME-Version: 1.0

On Fri, 2 Aug 1996 kagel AT quasar DOT bloomberg DOT com wrote:

> 
> As far as LANDMARK's indentation style, hey that's been my style for over ten
> years!  But seriously, it is the style promoted in all of the sample code in
> K&R, do not pummel the newbie for emulating the greats!  (Meaning Brian and
> Dennis not me.)  He is lining up his closing braces, with the matching opening
> statement, HE JUST FORGOT ONE and as a newbie was just as likely to miss this
> with any other indentation/brace position style!
> 
>     Argh!  Do I have to go through this again?!?  Please take whatever
>     disk, manual, or person you got this program from and burn him/her/it
>     at the stake.  There are only two *correct* ways to define main():
> 
>     int main( int argc, char **argv )
>     Use this when you need command-line parameters.
> 
>     int main( void )
>     Use this if you don't need command-line parameters.
> 
> Almost, actually there is a third valid definition for main():
> 
> 	int main( int argc, char **argv, char **environment )
> 

But what about 
  
  int main (int argc, char *argv[]) ?

I use this all the time.. *sob* and about indentation style.. I think the
best way is not to think about it at all. Get emacs and let the editor do
the indentation bit for you.

- Raw text -


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