🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.lang.c
Article #749

Re: Taming The Switch-Statement

#749
From: Keith Thompson
Date: Sat, 24 Oct 2026 23:38
20 lines
2452 bytes
Lawrence D’Oliveiro <ldo@nz.invalid> writes:
> On Fri, 23 Oct 2026 18:33:56 -0700, Chris M. Thomasson wrote:
>> On 10/23/2026 3:40 PM, Lawrence D’Oliveiro wrote:
>>> The trouble with a fixed name is, how do you refer to the instance
>>> of an outer class?
>>
>> Well, self can be internal to the API logic.
>
> If “self” refers to the current instance of the innermost class, how
> do you refer to an instance of an outer class?

What's a "class"?

There are ways to implement or simulate classes and inheritance in C.
Without knowing how that's being done, it's not very meaningful to ask
how to refer to an instance of an outer class.

-- 
Keith Thompson (The_Other_Keith) Keith.S.Thompson+u@gmail.com
void Void(void) { Void(); } /* The recursive call of the void */
Technical Details
Message-ID: <11bjfid$35feb$3@kst.eternal-september.org>
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail
References: <119qf6l$2rmg3$1@dont-email.me> <11b6224$2ejik$1@dont-email.me> <11b774o$2m8c9$3@dont-email.me> <11b7k22$2v8e5$1@dont-email.me> <11b8f5h$67l$1@reader2.panix.com> <11baah2$3te3v$1@dont-email.me> <11bb5ou$8nfg$2@dont-email.me> <11bcc4o$jt81$1@dont-email.me> <20261022094427.210@kylheku.com> <11bdp73$15nor$1@dont-email.me> <11bf2s9$1eo7q$2@dont-email.me> <11bgj4c$265sc$2@dont-email.me> <11bgno8$27pn2$1@dont-email.me> <11bh1u6$2av4s$1@dont-email.me> <11bjbah$340l8$5@dont-email.me>

Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!eternal-september.org!feeder.eternal-september.org!nntp.eternal-september.org!kst.eternal-september.org!.POSTED!not-for-mail
From: Keith Thompson <Keith.S.Thompson+u@gmail.com>
Newsgroups: comp.lang.c
Subject: Re: Taming The Switch-Statement
Date: Sat, 24 Oct 2026 16:38:53 -0700
Organization: None to speak of
Lines: 20
Message-ID: <11bjfid$35feb$3@kst.eternal-september.org>
References: <119qf6l$2rmg3$1@dont-email.me> <11b6224$2ejik$1@dont-email.me>
	<11b774o$2m8c9$3@dont-email.me> <11b7k22$2v8e5$1@dont-email.me>
	<11b8f5h$67l$1@reader2.panix.com> <11baah2$3te3v$1@dont-email.me>
	<11bb5ou$8nfg$2@dont-email.me> <11bcc4o$jt81$1@dont-email.me>
	<20261022094427.210@kylheku.com> <11bdp73$15nor$1@dont-email.me>
	<11bf2s9$1eo7q$2@dont-email.me> <11bgj4c$265sc$2@dont-email.me>
	<11bgno8$27pn2$1@dont-email.me> <11bh1u6$2av4s$1@dont-email.me>
	<11bjbah$340l8$5@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Injection-Date: Sat, 24 Oct 2026 23:38:54 +0000 (UTC)
Injection-Info: kst.eternal-september.org;
	logging-data="3325387"; mail-complaints-to="abuse@eternal-september.org";	posting-account="U2FsdGVkX18/BS9ELZKkymVf4vmrsbJl"; posting-host="a31d234860135fde93726068e77d5277"
User-Agent: Gnus/5.13 (Gnus v5.13)
Cancel-Lock: sha1:pDPYEJNTFXJksoSGHTh61LNmZNg= sha256:Z4UthgV0tnfU64gnSkvVADGQ0OLIuoOvCsNur8vrrk0=
	sha1:z/TroyF2I0UGsnDg96xC2xunOJ8= sha256:f0yGX58hppIsMtBw5od2y1jQ0dwgSU4SaNXYtztAdVA=