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=ham autolearn_force=no version=3.4.4 X-Google-Thread: 103376,b88383a5d9c51aa0 X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII Path: g2news1.google.com!news3.google.com!proxad.net!feeder1-2.proxad.net!newsfeed.straub-nv.de!newsfeed-fusi2.netcologne.de!195.14.215.230.MISMATCH!news.netcologne.de!newsfeed-hp2.netcologne.de!newsfeed.arcor.de!newsspool1.arcor-online.net!news.arcor.de.POSTED!not-for-mail Date: Wed, 25 Mar 2009 17:52:53 +0100 From: Georg Bauhaus User-Agent: Thunderbird 2.0.0.21 (Macintosh/20090302) MIME-Version: 1.0 Newsgroups: comp.lang.ada Subject: Re: Ada-Singleton-Why does it work like this? References: <5a7a870c-40e2-4803-8753-0f9cfd2b800f@k2g2000yql.googlegroups.com> <13su65cm8b5ov$.1198qla32cc3i$.dlg@40tude.net> <0c060dc1-ee16-48cd-89cf-5f4f02185ee8@c11g2000yqj.googlegroups.com> <21fe3b9c-776d-47b6-8eaa-bb27ba53e83f@q16g2000yqg.googlegroups.com> <7fad24bb-afca-4551-8d43-ffad304cd217@z15g2000yqm.googlegroups.com> In-Reply-To: <7fad24bb-afca-4551-8d43-ffad304cd217@z15g2000yqm.googlegroups.com> Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit Message-ID: <49ca6165$0$31331$9b4e6d93@newsspool4.arcor-online.net> Organization: Arcor NNTP-Posting-Date: 25 Mar 2009 17:52:53 CET NNTP-Posting-Host: 3392dcdf.newsspool4.arcor-online.net X-Trace: DXC=nIcZ>YlX=FDk:C4l9A;OcO4IUKP_O7VW]ogA;9OJDO8_SKFNSZ1n^B98iJ:kRbEjX@: patrick.gunia@googlemail.com schrieb: > because the package body knows the concrete structure of my > Singleton_Type, it also knows that a discriminant is not defined and > thus not necessary for creating new variables of my type. That is why I > �m able to create a Singleton instance within the package body. Is > this right? If so, then I finally got it... Almost, yes. The full view of the type in the private part may have _known_ discriminants. (It may have zero or more discriminants.) If it has one you can create objects of the type just as well because you can supply a value for the discriminant, thereby adding the necessary constraint. package body ... Var: T(Some_Dicriminant => 10);