On Fri, Feb 18, 2005 at 11:34:20AM +0000, Brian Brazil wrote:
> Sorry, also wrong. The patent spec was 'point to the same location in
> memory' - ISNOT isn't NOTEQUAL. Although someone would probably argue
> that the patent would also cover the above macro as a trivial extension
> (software patents are fun for all the family).
If the two pointers passed point do not point to the same portion of
memory, my operator works correctly. Just because it does other things
in addition to its correct operation does not make it wrong. In Brian's
example he uses "char *" as the variables, I was assuming that remains.
> #define ISNOT(x,y) (&(x) != &(y))
> or if you want to avoid !=
> #define ISNOT(x,y) (&(x) - &(y))
>> Granted this should never be true in C (unless used as ISNOT(x,x)), but
> I think its possible in C++ using references.
Not really, but in any event this would make it a different operator
- since it would no longer be operating on pointers :)
--
Colm MacCárthaigh Public Key: colm+pgp at stdlib.net
Maintained by the ILUG website team. The aim of Linux.ie is to
support and help commercial and private users of Linux in Ireland. You can
display ILUG news in your own webpages, read backend
information to find out how. Networking services kindly provided by HEAnet, server kindly donated by
Dell. Linux is a trademark of Linus Torvalds,
used with permission. No penguins were harmed in the production or maintenance
of this highly praised website. Looking for the
Indian Linux Users' Group? Try here. If you've read all this and aren't a lawyer: you should be!