Replies: 2 comments 5 replies
-
And even if the execution semantics of a Forth definition are specified in such a way that it never returns control to a caller and never throws an exception, this fact should not formally prevent A standard program can obtain the execution tokens for A standard program cannot obtain the execution tokens for
It's not quite correct. CORE In its turn, But if an exception frame exists, then Actually, the behavior of An interesting question is whether
Another case is when the input source cannot be read. It's probably an ambiguous condition and a system may do anything, for example, it can return control from |
Beta Was this translation helpful? Give feedback.
-
From
This says to me that the Exception Word set is not optional, which begs the question why not make section 9 part of the Core in the first place? Now if one can provide the Exception word set, it seems trivial to include the Exception Extension words, which currently only affect Seems very confusing and problematic for a standard to define multiple behaviours when the objective is portability and consistency [suppose this more a criticism of the standard in general, than the current topic]. |
Beta Was this translation helpful? Give feedback.
-
The Forth 200x Draft 19.1 makes no mention as to whether 9.6.2.0670 ABORT, 9.6.2.0680 ABORT", and/or 6.1.2050 QUIT (assuming it ever THROWs) can be CATCH-ed. The stack behaviour of these words would imply that they cannot be caught because the data and/or return stacks are emptied, throwing away any possible exception state saved by CATCH.
Depending on how "Empty the return stack..." and CATCH are implemented, eg. simply changing (and saving) a data/return stack pointers, a THROW might be a simple restoration of stack pointers assuming the stack memory has not been altered.
Can CATCH be applied to ABORT, ABORT", QUIT?
Beta Was this translation helpful? Give feedback.
All reactions