Article View: comp.lang.c
Article #540Re: Taming The Switch-Statement
From: Waldek Hebisch
Date: Mon, 19 Oct 2026 09:18
Date: Mon, 19 Oct 2026 09:18
26 lines
2207 bytes
2207 bytes
Dan Cross <cross@spitfire.i.gajendra.net> wrote:
> In article <11b0mfv$j5ll$1@dont-email.me>, bart <bc@freeuk.com> wrote:
>
>>C is a terrible choice for a cross-language API, as too many C-isms
>>creep in (like C macros, or vaguely defined types, including the famous
>>'plain char' that exists in no other language, which is neither signed
>>nor unsigned, and above all C preprocessor features).
>
> That's why ABIs matter.
>
> Look at the Vax-11 Procedure Calling and Condition Handling
> Standard from VMS 2.0; they simply wrote down what this stuff
> meant, and you could call between essentially any language on
> that system, whether it was C, Fortran, Bliss, COBOL, or
> whatever.
That is getting off-topic, but I looked at VMS documentation.
Simple cases are described with a lot of details. But I was
unable to find general case. Say, given array of structs
containing notrivial types like arrays inside. It seems that
for such types it is essentially "whatever language processor
decides to do" and the other end must know the convention.
Which seem to be exactly what happens on other platforms.
--
Waldek Hebisch
Technical Details
Message-ID:
<11b4n9g$4fik$2@paganini.bofh.team>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!newsfeed.bofh.team!paganini.bofh.team!not-for-mailReferences:
<119qf6l$2rmg3$1@dont-email.me> <11avmfb$55rt$1@dont-email.me> <11b0cvs$skc$1@reader2.panix.com> <11b0mfv$j5ll$1@dont-email.me> <11b3r71$6me$1@reader2.panix.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!newsfeed.bofh.team!paganini.bofh.team!not-for-mail
From: antispam@fricas.org (Waldek Hebisch)
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Mon, 19 Oct 2026 09:18:42 -0000 (UTC)
Organization: bofh.team Usenet service
Message-ID: <11b4n9g$4fik$2@paganini.bofh.team>
References: <119qf6l$2rmg3$1@dont-email.me> <11avmfb$55rt$1@dont-email.me> <11b0cvs$skc$1@reader2.panix.com> <11b0mfv$j5ll$1@dont-email.me> <11b3r71$6me$1@reader2.panix.com>
Injection-Date: Mon, 19 Oct 2026 09:18:42 -0000 (UTC)
Injection-Info: paganini.bofh.team; logging-data="147028"; mail-complaints-to="usenet@bofh.team"; posting-host="d028f9ad2fa2c51f22dbfed0d81d7daf"; posting-account="69e66f1681224ab92235b464ce7a90b6"
User-Agent: tin/2.6.2-20221225 ("Pittyvaich") (Linux/6.1.0-9-amd64 (x86_64))
X-Postfilter: Postfilter-NG 2026.10.2