Diff for /gforth/errors.fs between versions 1.2 and 1.12

version 1.2, 1997/03/13 23:40:31 version 1.12, 2002/04/01 15:34:34
Line 1 Line 1
 \ Load in error strings  \ Load in error strings
   
 \ Copyright (C) 1995 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?!
 : linked        here over @ a, swap ! ;  : linked        here over @ a, swap ! ;
   [THEN]
   
 : ERR" ( n -- )  : errstring ( addr u n -- )
        ErrLink linked      ErrLink linked
        ,      ,
        [char] " parse      string, align ;
        string, align ;  
   
 decimal  decimal
   
 -1 ERR" Aborted"  -1 s" Aborted" rot errstring
 -3 ERR" Stack overflow"  -3 s" Stack overflow" rot errstring
 -4 ERR" Stack underflow"  -4 s" Stack underflow" rot errstring
 -5 ERR" Return stack overflow"  -5 s" Return stack overflow" rot errstring
 -6 ERR" Return stack undeflow"  -6 s" Return stack underflow" rot errstring
 -7 ERR" Do-loops nested too deeply"  -7 s" Do-loops nested too deeply" rot errstring
 -8 ERR" Dictionary overflow"  -8 s" Dictionary overflow" rot errstring
 -9 ERR" Invalid memory address"  -9 s" Invalid memory address" rot errstring
 -10 ERR" Division by zero"  -10 s" Division by zero" rot errstring
 -11 ERR" Result out of range"  -11 s" Result out of range" rot errstring
 -12 ERR" Argument type mismatch"  -12 s" Argument type mismatch" rot errstring
 -13 ERR" Undefined word"  -13 s" Undefined word" rot errstring
 -14 ERR" Interpreting a compile-only word"  -14 s" Interpreting a compile-only word" rot errstring
 -15 ERR" Invalid FORGET"  -15 s" Invalid FORGET" rot errstring
 -16 ERR" Attempt to use zero-length string as a name"  -16 s" Attempt to use zero-length string as a name" rot errstring
 -17 ERR" Pictured numeric ouput string overflow"  -17 s" Pictured numeric ouput string overflow" rot errstring
 -18 ERR" Parsed string overflow"  -18 s" Parsed string overflow" rot errstring
 -19 ERR" Word name too long"  -19 s" Word name too long" rot errstring
 -20 ERR" Write to a read-only location"  -20 s" Write to a read-only location" rot errstring
 -21 ERR" Unsupported operation"  -21 s" Unsupported operation" rot errstring
 -22 ERR" Control structure mismatch"  -22 s" Control structure mismatch" rot errstring
 -23 ERR" Address alignment exception"  -23 s" Address alignment exception" rot errstring
 -24 ERR" Invalid numeric argument"  -24 s" Invalid numeric argument" rot errstring
 -25 ERR" Return stack imbalance"  -25 s" Return stack imbalance" rot errstring
 -26 ERR" Loop parameters unavailable"  -26 s" Loop parameters unavailable" rot errstring
 -27 ERR" Invalid recursion"  -27 s" Invalid recursion" rot errstring
 -28 ERR" User interrupt"  -28 s" User interrupt" rot errstring
 -29 ERR" Compiler nesting"  -29 s" Compiler nesting" rot errstring
 -30 ERR" Obsolescent feature"  -30 s" Obsolescent feature" rot errstring
 -31 ERR" >BODY used on non-CREATEd definition"  -31 s" >BODY used on non-CREATEd definition" rot errstring
 -32 ERR" Invalid name argument"  -32 s" Invalid name argument" rot errstring
 -33 ERR" Block read exception"  -33 s" Block read exception" rot errstring
 -34 ERR" Block write exception"  -34 s" Block write exception" rot errstring
 -35 ERR" Invalid block number"  -35 s" Invalid block number" rot errstring
 -36 ERR" Invalid file position"  -36 s" Invalid file position" rot errstring
 -37 ERR" File I/O exception"  -37 s" File I/O exception" rot errstring
 -38 ERR" Non-existent file"  -38 s" Non-existent file" rot errstring
 -39 ERR" Unexpected end of file"  -39 s" Unexpected end of file" rot errstring
 -40 ERR" Invalid BASE for floating point conversion"  -40 s" Invalid BASE for floating point conversion" rot errstring
 -41 ERR" Loss of precision"  -41 s" Loss of precision" rot errstring
 -42 ERR" Floating-point divide by zero"  -42 s" Floating-point divide by zero" rot errstring
 -43 ERR" Floating-point result out of range"  -43 s" Floating-point result out of range" rot errstring
 -44 ERR" Floating-point stack overflow"  -44 s" Floating-point stack overflow" rot errstring
 -45 ERR" Floating-point stack underflow"  -45 s" Floating-point stack underflow" rot errstring
 -46 ERR" Floating-point invalid argument"  -46 s" Floating-point invalid argument" rot errstring
 -47 ERR" Compilation word list deleted"  -47 s" Compilation word list deleted" rot errstring
 -48 ERR" invalid POSTPONE"  -48 s" invalid POSTPONE" rot errstring
 -49 ERR" Search-order overflow"  -49 s" Search-order overflow" rot errstring
 -50 ERR" Search-order underflow"  -50 s" Search-order underflow" rot errstring
 -51 ERR" Compilation word list changed"  -51 s" Compilation word list changed" rot errstring
 -52 ERR" Control-flow stack overflow"  -52 s" Control-flow stack overflow" rot errstring
 -53 ERR" Exception stack overflow"  -53 s" Exception stack overflow" rot errstring
 -54 ERR" Floating-point underflow"  -54 s" Floating-point underflow" rot errstring
 -55 ERR" Floating-point unidentified fault"  -55 s" Floating-point unidentified fault" rot errstring
 -56 ERR" QUIT"  -56 s" QUIT" rot errstring
 -57 ERR" Error in sending or receiving a character"  -57 s" Error in sending or receiving a character" rot errstring
 -58 ERR" [IF], [ELSE], [THEN] error"  -58 s" [IF], [ELSE], [THEN] error" rot errstring
   
   \ Gforth's errors:
   
   -2048 s" Cannot tick compile-only word (try COMP' ... DROP)" rot errstring
   
   variable next-exception -2049 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.2  
changed lines
  Added in v.1.12


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