Warning: mysqli::__construct(): (HY000/1203): User howardkn already has more than 'max_user_connections' active connections in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\includes\artfuncs.php on line 21
Failed to connect to MySQL: (1203) User howardkn already has more than 'max_user_connections' active connections
Warning: mysqli::query(): Couldn't fetch mysqli in D:\Inetpub\vhosts\howardknight.net\al.howardknight.net\index.php on line 66
Article <2024Nov8.092913@mips.complang.tuwien.ac.at>
Deutsch   English   Français   Italiano  
<2024Nov8.092913@mips.complang.tuwien.ac.at>

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

Path: eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: anton@mips.complang.tuwien.ac.at (Anton Ertl)
Newsgroups: comp.lang.forth
Subject: Re: bye with exit status
Date: Fri, 08 Nov 2024 08:29:13 GMT
Organization: Institut fuer Computersprachen, Technische Universitaet Wien
Lines: 27
Message-ID: <2024Nov8.092913@mips.complang.tuwien.ac.at>
References: <vgfmfe$22uop$1@dont-email.me> <vgg6q4$26lgs$1@dont-email.me> <4d5b92710816ddfe2dbbb04a2177b40b@www.novabbs.com> <c52c3b51c000c9139d938079e3cfe988@www.novabbs.com>
Injection-Date: Fri, 08 Nov 2024 09:54:40 +0100 (CET)
Injection-Info: dont-email.me; posting-host="eb9c13e3e9f209d09266346395aca3a4";
	logging-data="3293818"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX1+/L0gRWrBmNG+iT6FYQmaI"
Cancel-Lock: sha1:zfPM6KT3SvH8Tbg7+1U126x/mGk=
X-newsreader: xrn 10.11

mhx@iae.nl (mhx) writes:
>Same as remarked by minforth: there is a exit-handler chain in
>which the user can plug arbitrary routines.

In Gforth BYE is a deferred word, with the intention that it can be
extended with cleanup actions.

The disadvantage of this approach in connection with the non-0 exit is
that we probably also want to do the same cleanup in those cases.  The
best way to deal with that is probably the "EXIT-CODE !" approach.

Concerning the usual discussion about the name: I find that the system
is left in the error case with an uncaught THROW in script-execution
mode; in that case an exit code of 1 is returned by Gforth, so it's
not sufficient for communicating more than a binary result to the
calling script.  But I have not used non-binary exit codes for
non-Forth programs, either, and I do quite a bit of shell scripting.

In any case, while we have (BYE), I don't use it in application
programs.

- anton
-- 
M. Anton Ertl  http://www.complang.tuwien.ac.at/anton/home.html
comp.lang.forth FAQs: http://www.complang.tuwien.ac.at/forth/faq/toc.html
     New standard: https://forth-standard.org/
   EuroForth 2024: https://euro.theforth.net