From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM autolearn=unavailable autolearn_force=no version=3.4.4 X-Received: by 2002:ac8:5156:: with SMTP id h22mr6676356qtn.233.1576145844503; Thu, 12 Dec 2019 02:17:24 -0800 (PST) X-Received: by 2002:a9d:51ca:: with SMTP id d10mr7072640oth.76.1576145844344; Thu, 12 Dec 2019 02:17:24 -0800 (PST) Path: eternal-september.org!reader01.eternal-september.org!feeder.eternal-september.org!feeder5.feed.usenet.farm!feed.usenet.farm!feeder.usenetexpress.com!tr3.iad1.usenetexpress.com!border1.nntp.dca1.giganews.com!nntp.giganews.com!g89no6881278qtd.0!news-out.google.com!w29ni1102qtc.0!nntp.google.com!g89no6881269qtd.0!postnews.google.com!google-groups.googlegroups.com!not-for-mail Newsgroups: comp.lang.ada Date: Thu, 12 Dec 2019 02:17:24 -0800 (PST) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: google-groups.googlegroups.com; posting-host=2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5; posting-account=L2-UcQkAAAAfd_BqbeNHs3XeM0jTXloS NNTP-Posting-Host: 2a02:c7d:3c35:b000:325a:3aff:fe0f:37a5 References: <36d45c82-2a6b-4c60-baeb-1a4aef5189c7@googlegroups.com> <69c7677b-4aec-4db2-b240-de6b69f762b9@googlegroups.com> User-Agent: G2/1.0 MIME-Version: 1.0 Message-ID: <23879d99-f1b0-4ade-8f2a-e45014fa04a7@googlegroups.com> Subject: Re: Is this actually possible? From: Lucretia Injection-Date: Thu, 12 Dec 2019 10:17:24 +0000 Content-Type: text/plain; charset="UTF-8" Xref: reader01.eternal-september.org comp.lang.ada:57715 Date: 2019-12-12T02:17:24-08:00 List-Id: On Wednesday, 11 December 2019 21:34:15 UTC, Dmitry A. Kazakov wrote: > On 2019-12-11 22:12, Lucretia wrote: > > On Wednesday, 11 December 2019 19:58:54 UTC, Dmitry A. Kazakov wrote: > > >> If you need objects that could be packed into C arrays use a variant > >> record with the choice discriminant having a default. > > > > But in my cases, a variant cannot be used. > > Why? You must know all variants in order to compute the array element > size. In Ada you cannot have it either: Because it's a binding to a C record: https://github.com/Lucretia/aplug/blob/master/ladspa/src/ladspa.ads#L113