3 ms·
It gets philosophical fast, but something like a stack underflow error is a feature of the interpreter. It is not a part of the language itself. A misbehaving F
by upofadown 8y ago
It gets philosophical fast, but something like a stack underflow error is a feature of the interpreter. It is not a part of the language itself. A misbehaving Forth program will happily underflow through all of memory.
- MaxBarraclough 8y agoAccording to the language spec, it seems to be non-compliant to handle stack overflow that way (even if it's obviously a good feature): > In all integer arithmetic operations, both overflow and underflow shall be ignored. The value returned when either overflow or underflow occurs is implementation defined. http://www.forth.org/svfig/Win32Forth/DPANS94.txt http://www.forth.org/svfig/Win32Forth/DPANS94.txt
- upofadown 8y agoI think they mean arithmetic overflow and underflow.
- MaxBarraclough 8y agoOops! Second attempt: looks like they single out "stack underflow" as implementation-defined behaviour: > A system shall document the system action taken upon each of the general or specific ambiguous conditions identified in this Standard. So, essentially the opposite of what I said.