Groups | Search | Server Info | Login | Register
Groups > comp.lang.misc > #11742
| Path | csiph.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | Janis Papanagnou <janis_papanagnou+ng@hotmail.com> |
| Newsgroups | comp.lang.misc |
| Subject | Re: Algol 68 / Genie - scripting language and exit status codes |
| Date | Mon, 5 Jan 2026 02:21:18 +0100 |
| Organization | A noiseless patient Spider |
| Lines | 35 |
| Message-ID | <10jf3me$23rl9$5@dont-email.me> (permalink) |
| References | <10j5pfo$23rl8$1@dont-email.me> <10jc4h9$1if4q$1@dont-email.me> <10jcd25$23rl8$2@dont-email.me> <10jeupn$1ujaa$1@dont-email.me> <10jf035$2e9ua$2@dont-email.me> |
| MIME-Version | 1.0 |
| Content-Type | text/plain; charset=UTF-8; format=flowed |
| Content-Transfer-Encoding | 8bit |
| Injection-Date | Mon, 05 Jan 2026 01:21:19 +0000 (UTC) |
| Injection-Info | dont-email.me; posting-host="f2d2bc6e77c621d15acb3cf3e55c3c9b"; logging-data="2223785"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+OEX8ENxu2JKk3sBA0v/qz" |
| User-Agent | Mozilla Thunderbird |
| Cancel-Lock | sha1:dNvgVd94ZY3CVmeIyLQxi/+6OGw= |
| Content-Language | en-US |
| In-Reply-To | <10jf035$2e9ua$2@dont-email.me> |
| Xref | csiph.com comp.lang.misc:11742 |
Show key headers only | View raw
On 2026-01-05 01:19, Lawrence D’Oliveiro wrote: > On Sun, 4 Jan 2026 23:57:43 +0000, Andy Walker wrote: > >> (c) You probably /don't/ want your program simply to return the >> status, even in an extended A68 or A68G, Firstly, because most >> current programs terminate with some result that is not any sort of >> status [not even zero], so they will all need to be re-written, >> Secondly, because "interesting" status results come from /not/ >> simply running off the end of the program [eg interrupts, wrong >> permissions, non-existent files, ...] which, by default, is likely >> to cause your program to abort with an error. So a perhaps better >> mechanism would be to add a library routine which can set the status >> and can be used by either the programmer or A68G. > > Even if you weren’t concerned with backward compatibility, I still > wouldn’t want to do it C-style, where “main” is a procedure which is > given the command-line strings as arguments and is expected to return > the exit status. Much better to access these via library routines (or > implicit globals). Makes it easier to write separate argument-parsing > code, that kind of thing. The "C" case is a bit different; while you can 'return' from the main() function with an exit code you can also just exit() from anywhere. What's *similar* is that the outmost Algol 68 block has a similar "outstanding" role as the main() function in "C"; it's also not surprising that there's such specific language components to adapt to the environment, also in other languages.[*] Re "command-line strings as arguments"; sadly there's no standard and I don't think that it's supported to any ideal degree in Genie. Janis [*] There are, of course, also other languages that don't have such a special case and handle that more symmetrically.
Back to comp.lang.misc | Previous | Next — Previous in thread | Next in thread | Find similar
Algol 68 / Genie - scripting language and exit status codes Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-01-01 13:31 +0100
Re: Algol 68 / Genie - scripting language and exit status codes Andy Walker <anw@cuboid.co.uk> - 2026-01-03 22:17 +0000
Re: Algol 68 / Genie - scripting language and exit status codes Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-01-04 01:42 +0100
Re: Algol 68 / Genie - scripting language and exit status codes Andy Walker <anw@cuboid.co.uk> - 2026-01-04 23:57 +0000
Re: Algol 68 / Genie - scripting language and exit status codes Lawrence D’Oliveiro <ldo@nz.invalid> - 2026-01-05 00:19 +0000
Re: Algol 68 / Genie - scripting language and exit status codes Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-01-05 02:21 +0100
Re: Algol 68 / Genie - scripting language and exit status codes Janis Papanagnou <janis_papanagnou+ng@hotmail.com> - 2026-01-05 02:07 +0100
csiph-web