Next: core-other, Previous: core-idef, Up: The Core Words
-13 throw(Undefined word).
-19 throw(Word name too long)
-9 throw(Invalid memory address).
-12 THROW(Argument type mismatch).
-14 throw(Interpreting a compile-only word). In some cases, you get an execution token for
compile-only-error(which performs a
-14 throwwhen executed).
-10 throw(Division by zero); on other systems, this typically results in a
-55 throw(Floating-point unidentified fault).
-3 throw(Stack overflow),
-5 throw(Return stack overflow), or
-9 throw(Invalid memory address) (depending on the platform and how you achieved the overflow) as soon as the overflow happens. If it is not checked, overflows typically result in mysterious illegal memory accesses, producing
-9 throw(Invalid memory address) or
-23 throw(Address alignment exception); they might also destroy the internal data structure of
ALLOCATEand friends, resulting in various errors in these words.
allot, or indirectly with
createetc.) more memory than available in the dictionary, you get a
-8 throw(Dictionary overflow). If you try to access memory beyond the end of the dictionary, the results are similar to stack overflows.
-14 throw(Interpreting a compile-only word).
-17 throw(Pictured numeric ouput string overflow).
WORDdoes not check for overflow.
-10 throw(divide by zero) or
-55 throw(floating point unidentified fault). Overflow on division may result in these errors or in
-11 throw(result out of range).
Gforth-fastmay silently produce bogus results on division overflow or division by zero.
>numbercurrently overflow silently.
-4 throw(Stack underflow) is performed. Apart from that, stacks may be checked or not, depending on operating system, installation, and invocation. If they are caught by a check, they typically result in
-4 throw(Stack underflow),
-6 throw(Return stack underflow) or
-9 throw(Invalid memory address), depending on the platform and which stack underflows and by how much. Note that even if the system uses checking (through the MMU), your program may have to underflow by a significant number of stack items to trigger the reaction (the reason for this is that the MMU, and therefore the checking, works with a page-size granularity). If there is no checking, the symptoms resulting from an underflow are similar to those from an overflow. Unbalanced return stack errors can result in a variety of symptoms, including
-9 throw(Invalid memory address) and Illegal Instruction (typically
Createand its descendants perform a
-16 throw(Attempt to use zero-length string as a name). Words like
'probably will not find what they search. Note that it is possible to create zero-length names with
nextname(should it not?).
>INgreater than input buffer:
-12 THROW. Note that, once an input file is closed (e.g., because the end of the file was reached), its source-id may be reused. Therefore, restoring an input source specification referencing a closed file may lead to unpredictable results instead of a
In the future, Gforth may be able to restore input source specifications
from other than the current input source.
allotis not checked. This typically results in memory access faults or execution of illegal instructions.
-23 throw(Address alignment exception). Under Linux-Intel on a 486 or later processor with alignment turned on, incorrect alignment results in a
-9 throw(Invalid memory address). There are reportedly some processors with alignment restrictions that do not report violations.
abort" last word was headerless".
-32 throw(Invalid name argument) (unless name is a local or was defined by
CONSTANT; in the latter case it just changes the constant).
-13 throw(Undefined word)
: X POSTPONE TO ; IMMEDIATE.
Xperforms the compilation semantics of
>BODYproduces the PFA of the word no matter how it was defined.
DOES> changes the execution semantics of the last defined word no
matter how it was defined. E.g.,
CONSTANT DOES> is equivalent to
CREATE , DOES>.