home *** CD-ROM | disk | FTP | other *** search
- Newsgroups: comp.lang.c
- Path: sparky!uunet!portal!dfuller
- From: dfuller@portal.hq.videocart.com (Dave Fuller)
- Subject: Re: NH-- > NH
- Message-ID: <C0K4Fy.Fn7@portal.hq.videocart.com>
- Organization: VideOcart Inc.
- X-Newsreader: Tin 1.1 PL3
- References: <1993Jan8.210335.28340@sharebase.com>
- Date: Fri, 8 Jan 1993 22:43:10 GMT
- Lines: 24
-
- keith@torme.sharebase.com (Keith Chambless) writes:
- : In article <C0JMw6.680@netnews.jhuapl.edu> bandy@netnews.jhuapl.edu (Mike Bandy) writes:
- : >
- : >So what you're saying is that NH > NH. I don't believe it. Your
- : >compiler (or your logic) has some serious problems.
- :
- :
- : Weird. Mine (Solbourne w/OS/MP 4.0) works the same:
- :
- : if (nh-- > nh)
- : printf("nh-- > nh = true\n");
- :
- : prints true. I don't understand.
- :
-
- If the left side is evaluated before the right side it will happen.
- nh-- has a value of nh because the -- takes place after expression evaluation.
- The -- will happen and then the right side of the expression will be evaluated.
- It will have a value of nh. However, nh at this point contains a value that is
- 1 less than the left hand side of the expression.
-
- Dave Fuller
- dfuller@portal.hq.videocart.com
-
-