home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / software / 5064 < prev    next >
Encoding:
Text File  |  1992-12-21  |  1.3 KB  |  39 lines

  1. Newsgroups: comp.software-eng
  2. Path: sparky!uunet!elroy.jpl.nasa.gov!usc!zaphod.mps.ohio-state.edu!rpi!scott.skidmore.edu!pvonk
  3. From: pvonk@scott.skidmore.edu (Pierre VonKaenel)
  4. Subject: Re: C code Layout
  5. Message-ID: <1992Dec18.151710.23851@scott.skidmore.edu>
  6. Organization: Skidmore College, Saratoga Springs NY, 12866
  7. References: <MARTINC.92Dec16111734@hatteras.cs.unc.edu> <1992Dec17.081451@eklektix.com> <AJ3U.92Dec17172600@onyx.cs.virginia.edu>
  8. Date: Fri, 18 Dec 1992 15:17:10 GMT
  9. Lines: 28
  10.  
  11. In article <AJ3U.92Dec17172600@onyx.cs.virginia.edu> aj3u@onyx.cs.virginia.edu (Asim Jalis) writes:
  12. >I prefer the K&R style of using braces with statement blocks:
  13. >
  14. >    keyword (condition) {
  15. >        statement1;
  16. >        statement2;
  17. >        statement3;
  18. >    }
  19. >
  20.  
  21. I used to use this syntax until once I forgot one of the { and it
  22. wasn't noticable.  Took a while to find that bug.  At least..
  23.  
  24.     keyword (condition) 
  25.     {
  26.         statement1;
  27.         statement2;
  28.         statement3;
  29.     }
  30.  
  31. is easier to spot.  It's also more symmetric, which means from an
  32. artistic view, more pleasing   (I know, I know... subjective!)
  33.  
  34. -- 
  35. Pierre von Kaenel    | Skidmore College         | pvonk@skidmore.edu
  36. Math & CS Dept.        | Saratoga Springs, NY 12866 | (518)584-5000 Ext 2391
  37.  
  38. "Experience is the name everyone gives to their mistakes." Oscar Wilde
  39.