home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #31 / NN_1992_31.iso / spool / comp / lang / c / 18826 < prev    next >
Encoding:
Internet Message Format  |  1992-12-23  |  1005 b 

  1. Path: sparky!uunet!pipex!bnr.co.uk!uknet!gdt!bsmail!smee
  2. From: smee@bristol.ac.uk (Paul Smee)
  3. Newsgroups: comp.lang.c
  4. Subject: Re: C code Layout
  5. Message-ID: <1992Dec23.154450.2016@bristol.ac.uk>
  6. Date: 23 Dec 92 15:44:50 GMT
  7. References: <771@ulogic.UUCP>
  8. Reply-To: P.Smee@bristol.ac.uk (Paul Smee)
  9. Organization: University of Bristol
  10. Lines: 25
  11.  
  12. In article <771@ulogic.UUCP> hartman@ulogic.UUCP (Richard M. Hartman) writes:
  13. >... am I in the minority here by preferring style C:
  14. >
  15. >    keyword (condition) 
  16. >        {
  17. >        statement1;
  18. >        statement2;
  19. >        statement3;
  20. >        }
  21.  
  22. Probably.  I prefer style D:
  23.  
  24.     keyword (condition) {
  25.         statement1;
  26.         statement2;
  27.         statement3;
  28.         }
  29.  
  30. Myself.  I suspect it is due to my PL/1 upbringing, in which the {}s
  31. weren't used at all, and the 'end;' which terminated each block was
  32. pretty definitely (IMHO) part of the block which it ended.
  33.  
  34. -- 
  35. Paul Smee, Computing Service, University of Bristol, Bristol BS8 1UD, UK
  36.  P.Smee@bristol.ac.uk - ..!uunet!uknet!bsmail!p.smee - Tel +44 272 303132
  37.