Deutsch   English   Français   Italiano  
<vgfmfe$22uop$1@dont-email.me>

View for Bookmarking (what is this?)
Look up another Usenet article

Path: ...!eternal-september.org!feeder2.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: Ruvim <ruvim.pinka@gmail.com>
Newsgroups: comp.lang.forth
Subject: bye with exit status
Date: Wed, 6 Nov 2024 16:12:29 +0400
Organization: A noiseless patient Spider
Lines: 34
Message-ID: <vgfmfe$22uop$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 8bit
Injection-Date: Wed, 06 Nov 2024 13:12:30 +0100 (CET)
Injection-Info: dont-email.me; posting-host="b2d1d9bcd0389bf372c47b106cbce75a";
	logging-data="2194201"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX197aDTt/abNmy7fHpPwTY/r"
User-Agent: Mozilla Thunderbird
Cancel-Lock: sha1:skIbPmm3VD7llNr+ntY/+GaVVqE=
Content-Language: en-US
Bytes: 1780

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