home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!zaphod.mps.ohio-state.edu!usc!rpi!usenet.coe.montana.edu!news.u.washington.edu!stein.u.washington.edu!chuckb
- From: chuckb@stein.u.washington.edu (Charles Bass)
- Newsgroups: comp.lang.c
- Subject: Re: Function definition style
- Date: 30 Dec 1992 23:01:48 GMT
- Organization: University of Washington
- Lines: 28
- Message-ID: <1ht9osINNchb@shelley.u.washington.edu>
- References: <1992Dec30.223045.29467@news2.cis.umn.edu>
- NNTP-Posting-Host: stein.u.washington.edu
-
- wright@staff.tc.umn.edu (Mark Wright) writes:
-
- >Is there any good reason not to use the following style for defining
- >functions:
-
- >type function_name( varname1, varname2, varname3 )
-
- >type varname1;
- >type varname2;
- >type varname3;
-
- >I try to use the style in ansi k&r, but I notice that others are using this
- >style and I assume they aren't all using pre-ansi compilers. My problem is
- >that to use Brief's function listing command the end paren must be on the same
- >line as the function name, which is difficult to do using k&r 2 style if the
- >function needs several structs as parameters. Besides, it's easier to
- >document function parameters with k&r 1 style. Is there any good reason
- I dont think it's any easier to document parameters using this
- style. For example:
-
- type function_name(
- type varname1, /* comments */
- type varname2, /* more comments */
- type varname3) /* even more comments */
-
- works just fine in the ansi world of function headers.
-
- chuckb
-