home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!spool.mu.edu!darwin.sura.net!sgiblab!a2i!kpapai
- From: kpapai@rahul.net (Ken Papai)
- Subject: Re: should main be prototyped?
- Message-ID: <C0rnCq.D9o@rahul.net>
- Sender: news@rahul.net (Usenet News)
- Nntp-Posting-Host: bolero
- Organization: a2i network
- References: <1ivj3nINNa5v@shelley.u.washington.edu>
- Distribution: usa
- Date: Wed, 13 Jan 1993 00:14:49 GMT
- Lines: 18
-
- (Charles Bass) writes:
- >Someone asked me if main should be prototyped today and I
- >couldn't answer because of the following conflict in my
- >prototyping habits:
- >1) All functions should be prototyped.
- >2) I've never seen a prototype for main. (not found grepping the
- > .h files or in my 2 years of programming)
- >For code that should be ANSI/portable should a prototype be
- >used for main?
-
- I say most definitely yes. main() is a function, albeit in a
- special category, but a function nonetheless.
-
- I've seen code that calls main(), therefore it requires a prototype.
- Some compilers and lints will create your function prototypes for you.
- To prototype, or not to prototype -- there is no question!
- --
- Ken Papai <kpapai@rahul.net>
-