[REBOL] Re: Evaluating if's
From: amicom:sonic at: 1-Jul-2002 22:12
Chalz,
Instead of using AND and OR, the better REBOL way is ALL and ANY. Try this:
if all [2 = length? p: parse filename "." find pick p 2 "htm"][...]
I left off the "not none?" in front of the 'find because 'none
automatically gets evaluated as 'false but a successful 'find (which
returns an index into the series) is evaluated as 'true.
You can embed ANYs and ALLs inside of each other if you have a more complex
statement. I do it all the time. There are other neat uses for ANY and
ALL (in particular), but I hope you get the point for this example.
Later!
-Bo
Lechnowsky Technical Consulting
REBOL VAR
At 11:51 PM 7/1/02 -0400, you wrote: