Re: TRUE

"Andrew Molyneux" <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <31d201c3e03e$ac9b5100$6301ba0a@homer>
I think Mr Pimlott was joking, although I must admit it was pretty subtle
:-)

Another Andrew

----- Original Message ----- 
From: "Gaal Yahas" <[email protected]>
To: "Andrew Pimlott" <[email protected]>
Cc: <[email protected]>
Sent: Wednesday, January 21, 2004 4:43 PM
Subject: Re: TRUE


> On Wed, Jan 21, 2004 at 11:09:29AM -0500, Andrew Pimlott wrote:
> > I like to use symbolic constants.  Wha can remember what all those
> > 1, 0, undef, and ''s mean anyway?  So I start off all my programs
> > with
> >
> >     use constant FALSE => !TRUE;
> >     use constant TRUE => !FALSE;
>
> I start off all my programs with use strict :-)
>
> But more to the point, how do you use your TRUE and FALSE? Suppose you
> want to test the return value of this sub:
>
> sub returns_a_true_value { 8.2 }
>
> Would you do "if (returns_a_true_value() eq TRUE)"? "== TRUE"?
> Neither would work, and you can just do "if (returns_a_true_value())"
> directly anyway.
>
> -- 
> Gaal Yahas <[email protected]>
> http://gaal.livejournal.com/
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.