home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 19090 < prev    next >
Encoding:
Text File  |  1992-12-31  |  1.5 KB  |  38 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!spool.mu.edu!umn.edu!csus.edu!netcom.com!pdh
  3. From: pdh@netcom.com (Phil Howard )
  4. Subject: Re: Function definition style
  5. Message-ID: <1992Dec31.195531.11001@netcom.com>
  6. Organization: Netcom - Online Communication Services  (408 241-9760 guest) 
  7. References: <1992Dec30.223045.29467@news2.cis.umn.edu> <1992Dec31.141035.24200@mksol.dseg.ti.com>
  8. Date: Thu, 31 Dec 1992 19:55:31 GMT
  9. Lines: 27
  10.  
  11. mccall@mksol.dseg.ti.com (fred j mccall 575-3539) writes:
  12.  
  13. >I just like the way the old declarations LOOK -- it's nice and
  14. >consistent with every other variable declaration in the way that it
  15. >declares the parameters.  However, because ANSI has decreed (for what
  16. >seem good and sufficient reasons, but I still don't like it) that the
  17. >'classic' declarations will not type-check the parameters even if
  18. >there is a prototype somewhere which is visible, I try to force myself
  19. >to use the new-style declarations when the compiler will support them.
  20.  
  21. I like certain aspects about the old style, but I need to use the new
  22. semantics, so I have adopted a layout style like the following:
  23.  
  24.  
  25. unsigned long my_function(
  26.     struct tree_node *    this_one    ,
  27.     unsigned long        pattern        ,
  28.     int            how_many
  29. )
  30. {
  31.     /* local declarations and code goes here */
  32. }
  33. -- 
  34. /************************************************************************\
  35. | Phil Howard,  pdh@netcom.com,  KA9WGN    Spell protection?  "1(911)A1" |
  36. | "It's not broken... it's just functionally challenged" --Phil and Pete |
  37. \************************************************************************/
  38.