Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
| From | Kaz Kylheku <kaz@kylheku.com> |
|---|---|
| Newsgroups | comp.lang.c |
| Subject | Re: Can function pointers be compared for equality |
| Date | 2012-01-23 20:06 +0000 |
| Organization | A noiseless patient Spider |
| Message-ID | <20120123115909.372@kylheku.com> (permalink) |
| References | <16c3fab7-bcd4-40dd-8208-93e7358dec1e@kn4g2000pbc.googlegroups.com> <ad3ff3b8-b520-40f0-8e73-4a66a1426e37@n6g2000vbz.googlegroups.com> <8739b6zajt.fsf@blp.benpfaff.org> |
On 2012-01-23, Ben Pfaff <blp@cs.stanford.edu> wrote:
> Malcolm McLean <malcolm.mclean5@btinternet.com> writes:
>
>> On Jan 23, 1:54 pm, "V.Subramanian, India"
>> <subramanian10...@yahoo.com> wrote:
>>>
>>> Is this equality comparison check of function pointers, legal, correct
>>> and allowed ? (Note that it works in my implementation of gcc. But I
>>> do not want to go by one particular implementation).
>>>
>>> Please explain.
>>>
>> You can compare function ponters for equality. However you can't
>> compare for inequality. [...]
>
> In C, != is the inequality operator. You can compare function
> pointers with !=. You cannot compare them with the relational
> operators < > <= >=.
Fuck the C terminlogy and the insipid monkeys behind it, who long should have
called it quits.
In English math terminology, this is called an equation:
3x + 4 = 7
and this is called an inequality:
3x + 4 < 7
(Those of you who don't remember, ask the nearest fifth grader.)
A "relation" is a mapping between sets. Equality is a kind of relation
("equivalence relation") and so the == operator can rightfully be called
"relational".
Back to comp.lang.c | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Can function pointers be compared for equality "V.Subramanian, India" <subramanian100in@yahoo.com> - 2012-01-23 05:54 -0800
Re: Can function pointers be compared for equality Malcolm McLean <malcolm.mclean5@btinternet.com> - 2012-01-23 07:00 -0800
Re: Can function pointers be compared for equality blp@cs.stanford.edu (Ben Pfaff) - 2012-01-23 07:46 -0800
Re: Can function pointers be compared for equality Kaz Kylheku <kaz@kylheku.com> - 2012-01-23 20:06 +0000
Re: Can function pointers be compared for equality ec429 <ec429@cam.ac.uk> - 2012-01-23 20:42 +0000
Re: Can function pointers be compared for equality James Kuyper <jameskuyper@verizon.net> - 2012-01-23 16:04 -0500
Re: Can function pointers be compared for equality Ian Collins <ian-news@hotmail.com> - 2012-01-24 10:24 +1300
Re: Can function pointers be compared for equality James Kuyper <jameskuyper@verizon.net> - 2012-01-23 16:48 -0500
Re: Can function pointers be compared for equality Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-01-24 03:04 -0800
Re: Can function pointers be compared for equality gwowen <gwowen@gmail.com> - 2012-01-24 03:37 -0800
Re: Can function pointers be compared for equality Kleuske <kleuske@nowhere.net> - 2012-01-23 21:39 +0000
Re: Can function pointers be compared for equality gwowen <gwowen@gmail.com> - 2012-01-24 03:31 -0800
Re: Can function pointers be compared for equality ec429 <ec429@cam.ac.uk> - 2012-01-24 13:16 +0000
Re: Can function pointers be compared for equality Kaz Kylheku <kaz@kylheku.com> - 2012-01-23 22:11 +0000
Re: Can function pointers be compared for equality Ian Collins <ian-news@hotmail.com> - 2012-01-24 11:34 +1300
Re: Can function pointers be compared for equality Ben Bacarisse <ben.usenet@bsb.me.uk> - 2012-01-23 16:37 +0000
Re: Can function pointers be compared for equality Keith Thompson <kst-u@mib.org> - 2012-01-23 09:11 -0800
Re: Can function pointers be compared for equality pete <pfiland@mindspring.com> - 2012-01-23 20:06 -0500
Re: Can function pointers be compared for equality Keith Thompson <kst-u@mib.org> - 2012-01-23 17:45 -0800
Re: Can function pointers be compared for equality Kaz Kylheku <kaz@kylheku.com> - 2012-01-24 03:48 +0000
Re: Can function pointers be compared for equality James Kuyper <jameskuyper@verizon.net> - 2012-01-23 22:59 -0500
Re: Can function pointers be compared for equality Kaz Kylheku <kaz@kylheku.com> - 2012-01-24 04:22 +0000
Re: Can function pointers be compared for equality Nick Keighley <nick_keighley_nospam@hotmail.com> - 2012-01-24 03:07 -0800
Re: Can function pointers be compared for equality Kleuske <kleuske@nowhere.net> - 2012-01-24 11:16 +0000
csiph-web