home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / lang / c / 17062 < prev    next >
Encoding:
Text File  |  1992-11-23  |  1.1 KB  |  46 lines

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!math.fu-berlin.de!hamel!rene
  3. From: rene@hamel.uucp (Rene Mueller)
  4. Subject: Re: The Correct Way To Write C if-Statements
  5. Message-ID: <2H78QIO@math.fu-berlin.de>
  6. Sender: rene@hamel (Rene Mueller)
  7. Organization: Free University of Berlin, Germany
  8. References: <140742@lll-winken.LLNL.GOV> <1992Nov6.225622.25460@dg-rtp.dg.com> <604@ulogic.UUCP> <aaronk.193.722052372@county.lmt.mn.org> <1992Nov20.093957@gese.ge14.mdadv.gv.at>
  9. Date: Mon, 23 Nov 1992 22:12:50 GMT
  10. Lines: 34
  11.  
  12. In article <1992Nov20.093957@gese.ge14.mdadv.gv.at>, sca@gese.ge14.mdadv.gv.at (Petzi Schweda) writes:
  13. |>
  14. |> think you'll end up a little bit messy when using this one inside blocks:
  15. |>
  16. |> for (...)
  17. |>     {
  18. |>     if  (cond)
  19. |>     {
  20. |>         state;
  21. |>     }
  22. |>     else
  23. |>     {
  24. |>         state2;
  25. |>     }
  26. |>     }
  27. |>
  28. |> too much paranthesis in this column, for my taste ...
  29. |>
  30. Yeah. But what if you write it this way:
  31. for(...)
  32. {
  33.     if(cond)
  34.     {
  35.         statement1;
  36.     }
  37.     else
  38.     {
  39.         statement2;
  40.     }
  41. }
  42.  
  43. If you think I have too many <tab>'s use <space> instead...
  44.  
  45.     rene@math.fu-berlin.de
  46.