Re: Variable "shadowing"?
Re: Variable "shadowing"?
- Subject: Re: Variable "shadowing"?
- From: Giovannini <email@hidden>
- Date: Fri, 18 Mar 2005 18:15:39 -0600
Variable shadowing is when two variables legally have the same name in the same context. One variable hides/shadows the other. It is legal to have a function parameter with the same name as a global or member variable. The parameter is closer to the current context so it has precedence. Rename your parameter.
On Mar 18, 2005, at 1:38 PM, Mark Dawson wrote:
What does it mean to turn on variable shadowing?
I'm getting errors like:
declaration of "index" shadows a global implementation
- (void)insertGraphic:(Draw2D_BaseGraphic *)graphic atIndex:(unsigned)index
<x-tad-smaller>
/usr/include/string.h:107: warning: shadowed declaration is here
</x-tad-smaller>char *index(const char *, int);
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden