Hi Brian,

as far as I understand it, the only interesting thing now
is "catch" ("throw" seems to be the same as standard behaviour).

When using "catch", you can assume the whole function body
to be in a try block. Exceptions in the body of a function are
catched, and registered where the function is called.

having these definitions:

aa: func [ [catch] i ] [
   throw make error! "test"
]
cc: func [ i ] [
   throw make error! "test"
]
a: func [] [ aa 1 ]
c: func [] [ cc 1 ]

You'll get:

calling c (normal behaviour or "throw", exception at throw)
>> c
** Throw Error: ** User Error: test.
** Where: throw make error! "test"

calling a (exception at call of aa)
>> a
** User Error: test.
** Where: aa 1

This could be usefull for c-like asserts, etc


regards,

Ingo


Those were the words of [EMAIL PROTECTED]:
> Hey all,
> 
> Does anyone know what the function attributes are for?
<...> 

--  _     .                                _
ingo@)|_ /|  _| _  <We ARE all ONE   www._|_o _   _ ._ _  
www./_|_) |o(_|(/_  We ARE all FREE> ingo@| |(_|o(_)| (_| 
http://www.2b1.de/Rebol/                     ._|      ._|

Reply via email to