LINUX.IE, website of the Irish Linux Users' Group
Tux rules!

   
Home
New Users
Articles
Download
Projects
Community
Vendors

  Print Version
Email to...
 
Archives:


planetILUG

Recent News

News Archive


Join the
ILUG
on FaceBook


Join the
ILUG
on LinkedIn


Join the
ILUG SETI
Group



















 
 :: Mailing Lists

[ILUG] EU Rejects Patent Software Law - For Now

[ILUG] EU Rejects Patent Software Law - For Now

Bryan O'Donoghue typedef at eircom.net
Fri Feb 18 11:26:31 GMT 2005


Colm MacCarthaigh wrote:
> On Fri, Feb 18, 2005 at 11:07:29AM +0000, Bryan O'Donoghue wrote:
> 
>>#define ISNOT(x,y) if(x==y) return 1; else return 0;
> 
> 
> If you're going to post an insane rant, at least try and write code that
> would actually work.
> 
> #define ISNOT(x,y)  ((x) != (y))
> 
> I mean, you've just proved that the implementation of an ISNOT operator
> is not (no pun intended) obvious, and non trivial. Since you managed to
> mess it up this one-liner in quite a few ways.
> 

_ahem_

As insane as my rants are

char * x;
char * y;

if((x)!=(y))

is functionally equivalent to


if(x==y) return 1; else return 0;

except version two could be expressed like.

#define MEM_GOOD 1
#define MEM_BAD  -1

#define INFRINGE_PATENT_20040230959(x,y) if(x==y) return MEM_GOOD; else 
return MEM_BAD;

which has kudos points, for naming convention ... you know?



More information about the ILUG mailing list
Read this without the formatting.
                                                                                                    

 

Hosted by HEAnet


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!
RSS Version
Powered by Dell