Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL] Problem with try [ open/direct/binary tcp://... ] Re:(5)

From: al:bri:xtra at: 2-Oct-2000 15:00

e wrote:
> I think I get it... When the expression is reduced down, if the result is
type error!, it ab ends. Not quite as the error can be assigned to a variable. It's when Rebol evaluates the results and it's of error! type. For example:
>> error? err1: err2: err3: try [1 / 0]
== true
>> probe disarm err2
make object! [ code: 400 type: 'math id: 'zero-divide arg1: none arg2: none arg3: none near: [1 / 0] where: none ] Note that 'err1, 'err2 and 'err3 are all set to the same value and Rebol doesn't "ab end". It's when the error is evaluated by Rebol:
>> err2
** Math Error: Attempt to divide by zero. ** Where: 1 / 0 that the error causes the "ab end". I hope that clears things up. Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/ http://members.xoom.com/AndrewMartin/