home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #20 / NN_1992_20.iso / spool / comp / compiler / 1549 < prev    next >
Encoding:
Internet Message Format  |  1992-09-13  |  1.6 KB

  1. Xref: sparky comp.compilers:1549 comp.human-factors:2206
  2. Path: sparky!uunet!usc!cs.utexas.edu!rutgers!faatcrl!iecc!compilers-sender
  3. From: weberwu@inf.fu-berlin.de (Debora Weber-Wulff)
  4. Newsgroups: comp.compilers,comp.human-factors
  5. Subject: Re: language design tradeoffs
  6. Keywords: design, parse
  7. Message-ID: <92-09-068@comp.compilers>
  8. Date: 13 Sep 92 12:34:30 GMT
  9. References: <92-09-048@comp.compilers> <92-09-066@comp.compilers>
  10. Sender: compilers-sender@iecc.cambridge.ma.us
  11. Reply-To: weberwu@inf.fu-berlin.de (Debora Weber-Wulff)
  12. Organization: Free University of Berlin
  13. Lines: 21
  14. Approved: compilers@iecc.cambridge.ma.us
  15.  
  16. raveling@Unify.com (Paul Raveling) writes:
  17. [sick macro trap in C deleted]
  18.  
  19. >then the extra ';' terminates the entire 'if' statement and the following
  20. >'else' produces a syntax error.  Or if you had left yourself open to the
  21. >dangling else problem in nested if's, it's possible to get no syntax error
  22. >but instead to get a surprising flow of control.
  23.  
  24. Sigh. The problem is not the ';', it's the syntax of the if statement. If
  25. ';' were nothing more than a statement separator and the empty statement
  26. were allowed, we could write ';;;;;;;;;;;;;;;;' if we felt like it. Then
  27. 'if' must be terminated with a nice 'fi'and the problem goes away. Another
  28. reason why explicit terminators like od and fi are a good idea!
  29. -- 
  30. Debora Weber-Wulff                       dww@inf.fu-berlin.de
  31. Institut fuer Informatik                 +49 30 89691 124
  32. Nestorstr. 8-9
  33. D-W-1000 Berlin 31
  34. -- 
  35. Send compilers articles to compilers@iecc.cambridge.ma.us or
  36. {ima | spdcc | world}!iecc!compilers.  Meta-mail to compilers-request.
  37.