Hi Ladislav and all,

>, I was wrong. Here is a (complicated, but working) version of the DEFAULT
>function, that can handle it:

I also was experimenting with do/next and this is my code. It try to handle
also return, throw, break.

isr?: function [blk [block!]][res][
 while [not tail? blk][
  either error? try [
   error? catch [
    error? do does [
     error? loop 1 [
      error? set 'res do/next compose [error? (blk)]
     ]
    ]
   ]
  ][
   return true
  ][
   if none? res [prin "control detected " return false]
   blk: second res
   res: none
  ]
 ]
 false
]
block2: head insert tail copy [] try [first []]

isr? [1 2 first block2 3] ;==false
isr? [1 2 first block 3] ;==true
isr? [1 2 throw first block2 3] ;==control detected false
isr? [1 2 throw first block 3] ;==true
isr? [1 2 return first block2 3] ;==control detected false
isr? [1 2 return first block 3] ;==true
isr? [1 2 break/return first block2 3] ;==control detected false
isr? [1 2 break/return first block 3] ;==true

---
Ciao
Romano


-- 
To unsubscribe from this list, please send an email to
[EMAIL PROTECTED] with "unsubscribe" in the 
subject, without the quotes.

Reply via email to