Diff for /gforth/doc/gforth.ds between versions 1.91 and 1.92

version 1.91, 2000/11/29 22:21:57 version 1.92, 2001/01/18 14:57:37
Line 3111  The equivalent to the restoration code a Line 3111  The equivalent to the restoration code a
 : ...  : ...
   save-x    save-x
   try    try
     word-changing-x      word-changing-x 0
   end-try    recover endtry
   restore-x    restore-x
   throw ;    throw ;
 @end example  @end example
   
 As you can see, the @code{recover} part is optional.  This works if @code{word-changing-x} does not change the stack depth,
   otherwise you should add some code between @code{recover} and
   @code{endtry} to balance the stack.
   
 Reference: @ref{Exception Handling}.  Reference: @ref{Exception Handling}.
   
Line 5941  This performs @i{Code1}.  If @i{code1} c Line 5943  This performs @i{Code1}.  If @i{code1} c
 continues after the @code{endtry}.  If @i{Code1} throws, the stacks are  continues after the @code{endtry}.  If @i{Code1} throws, the stacks are
 reset to the state during @code{try}, the throw value is pushed on the  reset to the state during @code{try}, the throw value is pushed on the
 data stack, and execution constinues at @i{code2}, and finally falls  data stack, and execution constinues at @i{code2}, and finally falls
 through the @code{endtry} into the following code. If there is no  through the @code{endtry} into the following code.
 @code{recover} clause, this works like an empty recover clause.  
   
 doc-try  doc-try
 doc-recover  doc-recover
Line 5954  The cleanup example from above in this s Line 5955  The cleanup example from above in this s
 base @ >r TRY  base @ >r TRY
   hex foo \ now the hex is placed correctly    hex foo \ now the hex is placed correctly
   0       \ value for throw    0       \ value for throw
 ENDTRY  RECOVER ENDTRY
 r> base ! throw  r> base ! throw
 @end example  @end example
   

Removed from v.1.91  
changed lines
  Added in v.1.92


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