home *** CD-ROM | disk | FTP | other *** search
- Path: sparky!uunet!sdrc!thor!scjones
- From: scjones@thor.sdrc.com (Larry Jones)
- Newsgroups: comp.lang.c
- Subject: Re: Question to test general C knowledge
- Message-ID: <2391@sdrc.COM>
- Date: 13 Dec 92 19:19:08 GMT
- References: <19980@ksr.com> <PTmLVB4w165w@quest.UUCP> <1992Dec13.045828.1714@crd.ge.com>
- Sender: news@sdrc.COM
- Lines: 22
-
- In article <1992Dec13.045828.1714@crd.ge.com>, volpe@bart.NoSubdomain.NoDomain (Christopher R Volpe) writes:
- > You miss the point. One of them will happen first. Does the second
- > one constitute a modification? Look at it this way: When the "++" operator
- > is evaluated, the machine throws a card up in the air with the words
- > "put 3 in i" on it. That's the side effect associated with the "++" operator.
-
- The specifications in the C Standard give the machine the right to use a
- card that says "increment i" instead, which is where the indeterminancy
- and thus undefinedness come from.
-
- > A clearer example illustrating the issue I raise would be the following:
- > i = (i = 4)
-
- That's a more interesting question. My interpretation is that "modify"
- is used in the standard in a generic sense of "replacing the current
- value". In this sense, "i = 4" modifies i, even if the current value of
- i happens to be 4, because it's storing a "different" 4 into it. So, I
- would still call it undefined.
- ----
- Larry Jones, SDRC, 2000 Eastman Dr., Milford, OH 45150-2789 513-576-2070
- larry.jones@sdrc.com or ...uunet!sdrc!larry.jones
- I've got more brains than I know what to do with. -- Calvin
-