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 autolearn=unavailable autolearn_force=no version=3.4.4 Path: eternal-september.org!reader01.eternal-september.org!reader02.eternal-september.org!feeder.eternal-september.org!news.unit0.net!news.uni-stuttgart.de!news-1.dfn.de!news.dfn.de!news.uni-weimar.de!medsec1.medien.uni-weimar.de!slucks From: Stefan.Lucks@uni-weimar.de Newsgroups: comp.lang.ada Subject: Re: A function that cannot be called? Date: Thu, 18 Oct 2018 17:33:19 +0200 Organization: Bauhaus-Universitaet Weimar Message-ID: References: NNTP-Posting-Host: medsec1.medien.uni-weimar.de Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="915268786-1096094670-1539876800=:13871" X-Trace: pinkpiglet.scc.uni-weimar.de 1539876799 5438 141.54.178.228 (18 Oct 2018 15:33:19 GMT) X-Complaints-To: news@pinkpiglet.scc.uni-weimar.de NNTP-Posting-Date: Thu, 18 Oct 2018 15:33:19 +0000 (UTC) X-X-Sender: slucks@hexenstieg In-Reply-To: User-Agent: Alpine 2.21 (DEB 202 2017-01-01) Xref: reader02.eternal-september.org comp.lang.ada:54630 Date: 2018-10-18T17:33:19+02:00 List-Id: This message is in MIME format. The first part should be readable text, while the remaining parts are likely unreadable without MIME-aware tools. --915268786-1096094670-1539876800=:13871 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: QUOTED-PRINTABLE On Thu, 18 Oct 2018, G.B. wrote: > There is a type declaration, I rememberd, in Ada, that > does not allow any object of the type to be declared. What, exactly, is the point of your question? If you really want to define a type, which does not allow any object of=20 that type to be declared, here is one such type: type Void is abstract tagged null record; Note that objects of type Void'class can exist, but never, ever, any=20 objects of type Void. Thus, for good reason the Ada compiler refuses to=20 compile function Impossible(X: T) return Void; -------- I love the taste of Cryptanalysis in the morning! -------= - www.uni-weimar.de/de/medien/professuren/mediensicherheit/people/stefan-luck= s ----Stefan.Lucks (at) uni-weimar.de, Bauhaus-Universit=C3=A4t Weimar, Germa= ny---- --915268786-1096094670-1539876800=:13871--