Replies: 1 comment 4 replies
-
It is possible to define a similar word in a standard program: : quit ( i*x -- never )
begin
[: ." #> " pad 80 accept pad swap ;] catch if bye then
['] evaluate catch
[: ?dup if cr ." ### Error: " . depth ndrop else ." Ok" then cr ;] catch if bye then
again
; This word is not catch-able to the same extent as the standard word The behavior of the word is documented — if the user uses this word, he is aware 🙃
There are millions of ways to achieve this. The Forth system cannot prevent a Forth program from doing this. |
Beta Was this translation helpful? Give feedback.
4 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I still have a major concern with
QUIT
not being catch-able (given past discussions). Not being able toCATCH
QUIT
means that its not possible to clean-up nested input file-id ,FREE
any allocated memory, and any other resources, which can leave the system in a potentially unstable state with orphaned (leaked) resources.Beta Was this translation helpful? Give feedback.
All reactions