- Subject: Re: while()
- From: "John E. Davis" <davis>
- Date: Wed, 25 Apr 2001 22:27:25 -0400
Richard van Zon <rvanzon@xxxxxxxxxxxx> wrote:
>Hi,
>
>Am I right that this little piece of code doesn't work ?
>I get an stack underflow with it :
>
>while((handle=getnextresult())!=NULL)
>{
> ...
>}
Assigment expressions do not return a value. Hence, you are comparing
NOTHING to NULL. You can use the comma operator:
while (handle = getnextresult (), handle != NULL)
{
.
.
}
--John
[2001 date index]
[2001 thread index]
[Thread Prev] [Thread Next]
[Date Prev] [Date Next]