Re: TRUE

Gaal Yahas <[email protected]>
Newsgroups gmane.comp.lang.perl.fun
Message-ID <[email protected]>
On Wed, Jan 21, 2004 at 05:52:02PM +0100, Honza Pazdziora wrote:
> > 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())"
> 
> But 8.2 is not TRUE value. If returns_a_true_value is supposed to
> return a true true value, it should end with
> 
> 	return TRUE;
> 
> shouldn't it?

8.2 is not TRUE as Andrew defined it, but it is true under Perl's idea
of truth. That is in fact my point: using the non-native notion of what
truth is, you can't use any code from other people because you can't
assume it returns what you expect to be called true to signal truth.

-- 
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.