RE: Method not seeing array as array
RE: Method not seeing array as array
- Subject: RE: Method not seeing array as array
- From: Jeff Laing <email@hidden>
- Date: Fri, 4 Feb 2005 14:46:21 +1100
Hint: always review *three* times before you hit send - I wish I had...
> If you implement to the word of the spec, you'd have
>
> #ifndef nil
> #define nil ((id)0)
> #endif
>
> which strict type-checking compilers may well barf on since !
> is not a defined operation for pointer types. Or is it?
This of course only becomes a problem when you try to apply the ! operator
to an anonymous value, which Ive tended to do through pre-processor macros.
ie,
#define SOMEFUNC(func,target) \
if (func() && !target) [target notify]
where I might choose to do
SOMEFUNC(send,nil);
The evaluation of !nil by the macro processor is the issue.
(Yes, I use the pre-processor too much - its a personal failing :)
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden