Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Programming > Objective-c > Re: Quantifiers
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 4 of 5 Topic 930 of 1039
Post > Topic >>

Re: Quantifiers

by Michael Ash <mike@[EMAIL PROTECTED] > Dec 12, 2007 at 11:13 AM

Xcriber51 <ken@[EMAIL PROTECTED]
> wrote:
> // These macros are only for convenience, to save the
> // client from having to use the address-of op '&'.
> 
> #define equalTo             &eq
> #define lessThan            &lt
> #define greaterThan         &gt
> #define lessThanEqualTo     &le
> #define greaterThanEqualTo  &ge
> #define notEqualTo          &ne

Christian Brunschen already took my answer, so I am reduced to picking 
nits.

These macros are unnecessary. In C, the & and * operators are redundant 
when working with function pointers. If "func" is the name of a function, 
then "func" and "&func" give you precisely the same thing, both in terms 
of value and type. Likewise, if "funcPtr" is a function pointer, "funcPtr"

and "*funcPtr" are identical.

That is all.

-- 
Michael Ash
Rogue Amoeba Software
 




 5 Posts in Topic:
Quantifiers
"Xcriber51" <  2007-12-12 04:30:57 
Re: Quantifiers
cb@[EMAIL PROTECTED] (Ch  2007-12-12 13:14:25 
Re: Quantifiers
"Xcriber51" <  2007-12-12 09:15:16 
Re: Quantifiers
Michael Ash <mike@[EMA  2007-12-12 11:13:46 
Re: Quantifiers
hns <hns@[EMAIL PROTEC  2007-12-13 03:19:40 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan12V112 Tue Oct 7 7:21:06 CDT 2008.