Xref: utzoo comp.lang.c:15812 comp.sys.ibm.pc:23808 Path: utzoo!attcan!uunet!lll-winken!ncis.llnl.gov!helios.ee.lbl.gov!pasteur!agate!bionet!csd4.milw.wisc.edu!mailrus!purdue!decwrl!decvax!ima!haddock!karl From: karl@haddock.ima.isc.com (Karl Heuer) Newsgroups: comp.lang.c,comp.sys.ibm.pc Subject: Re: using floats in functional prototypes Message-ID: <11556@haddock.ima.isc.com> Date: 27 Jan 89 00:22:03 GMT References: <1989Jan18.092522.14499@gpu.utcs.toronto.edu> <942@ubu.warwick.UUCP> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 12 In article <942@ubu.warwick.UUCP> geoff@emerald.UUCP (Geoff Rimmer) writes: >... Finally, if you want to do a function prototype for a function with no >arguments (e.g. main() in your example), the PROTOTYPE should have 'void' >between the parentheses, but the DEFINITION shouldn't: I see no reason to make such an exception. If you've got prototypes, use them for both declarations and defintions, whether or not the function takes a positive number of arguments. In particular, int main(void) { return 0; } is perfectly correct. The old style (without `void') is obsolescent. Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint