[REBOL] Re: Evaluating if's
From: ingo:2b1 at: 2-Jul-2002 10:00
Hi Charles,
Charles wrote:
> Here's a little question. Perhaps I've been spoiled in other
languages, but
> this is starting to frustrate me. I have something like: if THIS and
> THAT [] Thing is, if THIS is false, it continues to evaluate THAT
> anyways.
>
> if (2 = length? p: parse filename ".") AND (not none? find pick p 2 "htm") [
What you are searching for is 'all, used like this:
if all [
(2 = length? p: parse filename ".")
(not none? find pick p 2 "htm")
] [
'whatever-you-like-to-do-now
]
'all and its companion 'any use short-circuit evalution.
Kind regards,
Ingo