[REBOL] Problem with try [ open/direct/binary tcp://... ] Re:(3)
From: al:bri:xtra at: 2-Oct-2000 14:20
e wrote:
> It looks like both would work, according to 'help try'...
> DESCRIPTION:
> Tries to DO a block and returns its value or an error.
> gp: try [ open/... ]
> and
> try [ gp: open/... ]
>
> should be equivalent, no?
You're slightly misreading the description. Have a look at the simple
example below:
>> try [1 / 0]
** Math Error: Attempt to divide by zero.
** Where: 1 / 0
>> error? try [1 / 0]
== true
>> error? err: try [1 / 0]
== true
>> probe err
** Math Error: Attempt to divide by zero.
** Where: 1 / 0
>> err: none
== none
>> error? try [err: 1 / 0]
== true
>> probe err
none
== none
Note that there is a difference.
Andrew Martin
ICQ: 26227169
http://members.nbci.com/AndrewMartin/
http://members.xoom.com/AndrewMartin/