Mail Archives: djgpp/1996/08/02/12:35:26
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 -