[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Error Message
From: |
Rob Kewley |
Subject: |
Re: Error Message |
Date: |
Thu, 07 May 1998 06:14:40 -0400 |
Gek Woo Tan wrote:
>
> Hi,
>
> Could someone help me? I created a list of objects and I'm trying to print
> out the contents of my list:
>
> id index;
> Agent *aAgent;
>
> index = [Tier1List begin: [self getZone]];
> while (aAgent = [index next]) {
> blah ... blah ...
> }
>
> I get the compilation error:
>
> ModelSwarm.m:138: warning: suggest parentheses around assignment used as
> truth value
> (i.e. the "while (aAgent = [index next])" line)
>
> I don't understand the error message. I don't know if there's some
> mistake with the syntax.
>
The error message is just a warning, and on any system I have used so
far, it has no effect on execution. If you want to get rid of the
annoying message, simply put another layer of parenthesis in your code
as follows:
while ((aAgent = [index next])) {
Rob Kewley
==================================
Swarm-Support is for discussion of the technical details of the day
to day usage of Swarm. For list administration needs (esp.
[un]subscribing), please send a message to <address@hidden>
with "help" in the body of the message.
==================================
- Tricky, tricky, glen e. p. ropella, 1998/05/06
- AutoDrop YES/NO, Parviez HosseiniC, 1998/05/08
- Re: AutoDrop YES/NO, Marcus G. Daniels, 1998/05/08
- Installation, Zafar Iqbal, 1998/05/09
- Re: Installation, pauljohn, 1998/05/09
- Re: Installation, Marcus G. Daniels, 1998/05/09
- Re: Installation, Zafar Iqbal, 1998/05/10
- Re: Installation, Marcus G. Daniels, 1998/05/10
- Re: Installation, Marcus G. Daniels, 1998/05/10
- About my Faq (was Re: Installation), Paul Johnson, 1998/05/10