[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

Re: Any C++ on Alpha gfurus out there?



On Fri, 13 Nov 1998, Nicholas Sallembian wrote:

> Try this code :
...
>                 if (wd)
>                    if (wd->m_id==id)
...
> There might be a problem in the order the if expression is evaluated : if
> wd is NULL and wd->m_id is evaluated first... Crash !

[over the original code] :

> >                 if (wd && (wd->m_id==id))

I sincerely hope that is not the problem; it is very clearly defined in the
C programming language that logical AND and OR operations proceed from left
to right.

-bp
--
B. James Phillippe	. bryan@terran.org
UNIX Software Engineer	. http://www.terran.org/~bryan
Member since 1.1.59	. finger:bryan@earth.terran.org
MOTM: Waiting for the DSL to go in :/



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index] []