On 12-Oct-1999/0:05:29+1:00, [EMAIL PROTECTED] wrote:
>[EMAIL PROTECTED] wrote:
>
>> Can someone explain to Perl-brained person why the first expression is in
>> parenthesis and the second one is in blocks?
>
>it's simple - if condition [block to do]
>
>you have to use (), as in other case rebol would perform path <> "/" first,
>result of which would be returned to back tail, resulting in error. You can
>write it also in the following way:
>
>if (last path) <> "/" [append path "/"]
Actually, LAST returns the last element as a character so you would have to write
it like this:
if (last path) <> #"/" [append path "/"]
It could also be written as:
if #"/" <> last path [append path "/"]
This is because REBOL will first try to compare #"/" <> last, but last requires a
parameter and REBOL knows this, so it will grab that parameter first, in this case
the word PATH.
--
Bohdan "Bo" Lechnowsky
Technical Support / Quality Assurance
REBOL Technologies 707-467-8000 (http://www.rebol.com)
Download the REBOL Messaging Language for all Platforms