Sujet : bye with exit status
De : ruvim.pinka (at) *nospam* gmail.com (Ruvim)
Groupes : comp.lang.forthDate : 06. Nov 2024, 13:12:29
Autres entêtes
Organisation : A noiseless patient Spider
Message-ID : <vgfmfe$22uop$1@dont-email.me>
User-Agent : Mozilla Thunderbird
Many Forth systems running under an operating system provide system-specific capabilities to terminate with an exit status [1].
For example, the following code fragments have stack effect ( n -- ⊥ )
and use n as the process exit status:
SwiftForth "exitstatus ! bye"
VfxForth "exitcode ! bye"
Gforth "(bye)"
ciforth "exit-code ! bye"
mf3 "sysexit"
Post4 "bye-code"
SP-Forth "halt"
Could you suggest some names for the word with this functionality so that one of them can be standardized?
This word should not output any messages.
There are at least three different notions of premature termination of code execution:
— return from a Forth definition (to the caller)
— terminate a thread/task
— terminate the process
And they should not be confused.
[1] <
https://en.wikipedia.org/wiki/Exit_status>
-- Ruvim