From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.5-pre1 (2020-06-20) on ip-172-31-74-118.ec2.internal X-Spam-Level: X-Spam-Status: No, score=-1.9 required=3.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.5-pre1 Path: eternal-september.org!reader02.eternal-september.org!aioe.org!pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org.POSTED!not-for-mail From: Stephen Leake Newsgroups: comp.lang.ada Subject: Re: Simple example on interfaces Date: Mon, 25 Jan 2021 11:05:24 -0800 Organization: Aioe.org NNTP Server Message-ID: <865z3k7s7f.fsf@stephe-leake.org> References: NNTP-Posting-Host: pBWEO6hi52oGFheO/GY5ag.user.gioia.aioe.org Mime-Version: 1.0 Content-Type: text/plain X-Complaints-To: abuse@aioe.org User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.1 (windows-nt) X-Notice: Filtered by postfilter v. 0.9.2 Cancel-Lock: sha1:budy4OIM99R30m+Unp/NEZNx24A= Xref: reader02.eternal-september.org comp.lang.ada:61198 List-Id: Mario Blunk writes: > I'm trying to solve a problem of multiple inheritance. It seems to me > that an interface could be the solution although the interface is > still a mystery for me. > > This is the example code: > https://github.com/Blunk-electronic/ada_training/blob/master/src/interfaces_1/interfaces_1.adb An interface type cannot declare any data: see http://www.ada-auth.org/standards/2xrm/html/RM-3-9-4.html So type_c can be: type type_C is interface; and you can define subprograms for type_C, but not data. -- -- Stephe