Re: Re: (or 0 t) ?

JP Massar <[email protected]> Fri, 30 May 2003 18:13:42 -0700
Newsgroups gmane.lisp.corman
Message-ID <[email protected]>
At 01:08 AM 5/31/03 +0000, smallhairytroll wrote:
>--- In [email protected], "smallhairytroll" <lcluke@h...>
>wrote:
> > Isn't (or 0 t) supposed to return t ? It returns 0 with me.
>
>I see this has been covered earlier...

No, what I wrote below has nothing to do with what you are asking.

(or 0 t) returns 0, because to Lisp only NIL is false, everything else
is TRUE.

OR returns the first TRUE value, not the first value exactly identical
to T.

(or nil nil nil 5 6) --> 5

(or nil 6 t) --> 6




>[JP Massar] [QUOTE]
>
>Corman is not doing evaluation. Corman always
>compiles everything, even things you type into it interactively.
>
>So the Corman compiler is walking over the form (/ 1 0), noticing
>that
>it is composed completely of constant forms, and trying
>to collapse the expression into a single value, much as it would
>collapse (+ 1 1) at compile time into '2'.
>
>But it doesn't currently test whether its attempt to collapse the
>expression succeeds or fails; if the expression it is collapsing
>causes an error, that error is allowed to be signalled at compile
>time.
>
>{/QUOTE]
>


>Would an attempt to evaluate t fail ?
>
>-Luke
>
>
>
>To unsubscribe from this group, send an email to:
>[email protected]
>
>
>
>Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/



------------------------ Yahoo! Groups Sponsor ---------------------~-->
Get A Free Psychic Reading! Your Online Answer To Life's Important Questions.
http://us.click.yahoo.com/Lj3uPC/Me7FAA/ySSFAA/SyjtlB/TM
---------------------------------------------------------------------~->

To unsubscribe from this group, send an email to:
[email protected]

 

Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/