From: Mike McCarty (jmccarty_at_ssd.usa.alcatel.com)
Date: 2001-01-02 22:29:01
On Tue, 2 Jan 2001, Bryan Pope wrote:
> > > Hello,
> > >
> > > > Or, better,
> > > >
> > > > while ((c = *value) != 39 && c != 62) {
> > > > <stuff>
> > > > }
> > >
> > > Forgive me, but if my memory serves me right, C (at least pre-ANSI) does NOT
> > > define the order in which this will be evaluated, so the second part (c!=62)
> > > might be evaluated BEFORE the first part with the assignment, in that case,
> > > this will NOT evaluate to the expected condition.
>
> I only just joined this list. Where is the rest of the code? Since you have
> to make sure that c is assigned *value then you could do this:
>
> c = *value;
> while (c != 39 && c != 62) {
> (stuff)
> <I am assuming value is pointed somewhere else in this loop>
> c = *value;
> }
The code I gave above accomplishes what you wrote.
----------------------------------------------------------------------
To unsubscribe from the list send mail to majordomo_at_musoftware.de with
the string "unsubscribe cc65" in the body(!) of the mail.
This archive was generated by hypermail 2.1.3 : 2001-12-14 22:05:37 CET