[REBOL] Re: About Attempt
From: nitsch-lists:netcologne at: 26-Dec-2002 23:37
pat665 wrote:
>Hi List,
>
>>From the syntax shown with "HELP ATTEMPT" it seems possible to use the function like
this:
>
>attempt a
>
>However when 'a is not defined an error is rised.
>
>>>attempt a
>>>
>** Script Error: a has no value
>** Where: do-boot
>** Near: attempt a
>
>obviously the right syntax is more like
>
>attempt [a]
>or
>attempt [1 / 0]
>
>Do you think it's worth sending this to RT feedback?
>
No, that is normal behavior. rebol evaluates from left to right, first
the arguments, then the function.
so first it evaluates 'a, then 'attempt .
'a has no value, so 'bang . 'attempt is never called.
>Patrick
>
-volker