Diff for /gforth/errors.fs between versions 1.7 and 1.13

version 1.7, 1999/02/03 00:10:20 version 1.13, 2003/02/17 22:42:08
Line 1 Line 1
 \ Load in error strings  \ Load in error strings
   
 \ Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.  \ Copyright (C) 1995,1996,1997,1998,1999 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 16 Line 16
   
 \ You should have received a copy of the GNU General Public License  \ You should have received a copy of the GNU General Public License
 \ along with this program; if not, write to the Free Software  \ along with this program; if not, write to the Free Software
 \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
   
 [IFUNDEF] linked \ defined by chains.fs?!  [IFUNDEF] linked \ defined by chains.fs?!
 : linked        here over @ a, swap ! ;  : linked        here over @ a, swap ! ;
Line 27 Line 27
     ,      ,
     string, align ;      string, align ;
   
 variable next-exception -2048 next-exception !  
   
 : exception ( addr u -- n ) \ exception- gforth  
     \G @var{n} is a previously unused THROW value in the range  
     \G (-4095...-256). Consecutive calls to EXCEPTION return  
     \G consecutive decreasing numbers. Gforth uses the string  
     \G @var{addr u} as error message.  
     next-exception @ errstring  
     next-exception @  
     -1 next-exception +! ;  
   
 decimal  decimal
   
 -1 s" Aborted" rot errstring  -1 s" Aborted" rot errstring
 -3 s" Stack overflow" rot errstring  -3 s" Stack overflow" rot errstring
 -4 s" Stack underflow" rot errstring  -4 s" Stack underflow" rot errstring
 -5 s" Return stack overflow" rot errstring  -5 s" Return stack overflow" rot errstring
 -6 s" Return stack undeflow" rot errstring  -6 s" Return stack underflow" rot errstring
 -7 s" Do-loops nested too deeply" rot errstring  -7 s" Do-loops nested too deeply" rot errstring
 -8 s" Dictionary overflow" rot errstring  -8 s" Dictionary overflow" rot errstring
 -9 s" Invalid memory address" rot errstring  -9 s" Invalid memory address" rot errstring
Line 97  decimal Line 86  decimal
 -56 s" QUIT" rot errstring  -56 s" QUIT" rot errstring
 -57 s" Error in sending or receiving a character" rot errstring  -57 s" Error in sending or receiving a character" rot errstring
 -58 s" [IF], [ELSE], [THEN] error" rot errstring  -58 s" [IF], [ELSE], [THEN] error" rot errstring
   
   \ Gforth's errors:
   
   -2048 s" Cannot tick compile-only word (try COMP' ... DROP)" rot errstring
   -2049 s" Write to broken pipe" rot errstring
   
   variable next-exception -2050 next-exception !
   
   : exception ( addr u -- n ) \ exception- gforth
       \G @var{n} is a previously unused @code{throw} value in the range
       \G (-4095...-256). Consecutive calls to @code{exception} return
       \G consecutive decreasing numbers. Gforth uses the string
       \G @var{addr u} as an error message.
       next-exception @ errstring
       next-exception @
       -1 next-exception +! ;
   
   

Removed from v.1.7  
changed lines
  Added in v.1.13


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