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

  1. Newsgroups: comp.lang.c
  2. Path: sparky!uunet!ftpbox!mothost!citi.prds.cdx.mot.com!dan
  3. From: dan@cae.prds.cdx.mot.com (Dan Breslau)
  4. Subject: Re: Question to test general C knowledge
  5. Message-ID: <1992Dec14.150401.1283@cae.prds.cdx.mot.com>
  6. Organization: none
  7. References: <19980@ksr.com> <PTmLVB4w165w@quest.UUCP> <1992Dec11.175620.20308@crd.ge.com> <1992Dec12.224541.29854@thunder.mcrcim.mcgill.edu> <1992Dec13.045828.1714@crd.ge.com>
  8. Date: Mon, 14 Dec 1992 15:04:01 GMT
  9. Lines: 19
  10.  
  11. volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe) writes:
  12.  
  13. >You miss the point. One of them will happen first. Does the second
  14. >one constitute a modification? Look at it this way: When the "++" operator
  15. >is evaluated, the machine throws a card up in the air with the words
  16. >"put 3 in i" on it. That's the side effect associated with the "++" operator.
  17. >And since the value of the "++i" subexpression is "3", when the "="
  18. >operator is evaluated, the machine throws up another card in the air with
  19. >the words "put 3 in i" on it. The side effects are applied in the order
  20. >in which they fall. But since both side effects do the same thing, is
  21. >the object really being "modified" again when the second card falls?
  22.  
  23. No, really, you're missing the point.  The point is that you can't
  24. assume that the compiler will behave rationally just because common sense
  25. says it should.  The compiler will behave rationally _only_ where the
  26. ANSI standard says it should (modulo bugs and/or non-compliance.)
  27.  
  28. Dan Breslau
  29. dan@codex.com
  30.