Diff for /gforth/kernel/basics.fs between versions 1.51 and 1.52

version 1.51, 2006/02/25 18:28:12 version 1.52, 2006/03/25 18:37:16
Line 219  has? glocals [IF] Line 219  has? glocals [IF]
  laddr# [ 0 , ] ;   laddr# [ 0 , ] ;
 [THEN]  [THEN]
   
   has? ec [IF]
       : catch  ( ... xt -- ... 0 )
           handler @ >r sp@ >r
           rp@ handler ! execute 0 r> drop r> handler ! ;
       : throw  ( error -- error )  dup 0= IF  drop EXIT  THEN
           handler @ rp! r> swap >r sp! r> r> handler ! ;
   [ELSE]
 defer catch ( x1 .. xn xt -- y1 .. ym 0 / z1 .. zn error ) \ exception  defer catch ( x1 .. xn xt -- y1 .. ym 0 / z1 .. zn error ) \ exception
 \G @code{Executes} @i{xt}.  If execution returns normally,  \G @code{Executes} @i{xt}.  If execution returns normally,
 \G @code{catch} pushes 0 on the stack.  If execution returns through  \G @code{catch} pushes 0 on the stack.  If execution returns through
Line 243  defer throw ( y1 .. ym nerror -- y1 .. y Line 250  defer throw ( y1 .. ym nerror -- y1 .. y
         [ [ELSE] ] quit [ [THEN] ]          [ [ELSE] ] quit [ [THEN] ]
     then ;      then ;
 is throw  is throw
   [THEN]
   
 \ (abort")  \ (abort")
   

Removed from v.1.51  
changed lines
  Added in v.1.52


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>