Re: Annoying warning: statement with no effect
Re: Annoying warning: statement with no effect
- Subject: Re: Annoying warning: statement with no effect
- From: John Blackburn <email@hidden>
- Date: Mon, 11 Nov 2002 12:15:46 -0800
Try swapping those last two clauses...
for (r = [addRowsField intValue]; r == 0 ; r-- )
[self createNewPoint];
John Blackburn
On Monday, November 11, 2002, at 11:39 AM, Jonathan Jackel wrote:
Several of the for loops in my projects are generating a compiler
warning
stating "statement with no effect". But the statements all have
effects and
behave as intended. For instance:
for (r = [addRowsField intValue]; r--; r == 0)
[self createNewPoint];
This statement works exactly as you would expect. The variable r
starts
with the number in a field, decrements with each loop, and stops when r
reaches zero.
Anyone else seen this? What's the cure?
Jonathan
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.