home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!munnari.oz.au!spool.mu.edu!umn.edu!staff.tc.umn.edu!wright
- From: wright@staff.tc.umn.edu (Mark Wright)
- Subject: Function definition style
- Message-ID: <1992Dec30.223045.29467@news2.cis.umn.edu>
- Sender: news@news2.cis.umn.edu (Usenet News Administration)
- Nntp-Posting-Host: staff.tc.umn.edu
- Organization: University of Minnesota
- Date: Wed, 30 Dec 1992 22:30:45 GMT
- Lines: 21
-
- 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
- for me to continue to use k&r 2 style (other than the fact that it makes
- the function declaration in a .h file a simple cut and paste operation)?
-
- --
- Mark Wright
- wright@epx.cis.umn.edu
-