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=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: g2news2.google.com!postnews.google.com!z15g2000yqm.googlegroups.com!not-for-mail From: "patrick.gunia@googlemail.com" Newsgroups: comp.lang.ada Subject: Re: Ada-Singleton-Why does it work like this? Date: Wed, 25 Mar 2009 04:49:15 -0700 (PDT) Organization: http://groups.google.com Message-ID: References: <5a7a870c-40e2-4803-8753-0f9cfd2b800f@k2g2000yql.googlegroups.com> <9a5fb100-c38d-45f6-a482-1c67b26c5866@z15g2000yqm.googlegroups.com> <19a1c6cf-4e4d-402c-902d-3ea2055b4779@c11g2000yqj.googlegroups.com> <49ca14f1$0$30231$9b4e6d93@newsspool1.arcor-online.net> NNTP-Posting-Host: 78.34.66.221 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable X-Trace: posting.google.com 1237981755 2726 127.0.0.1 (25 Mar 2009 11:49:15 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 25 Mar 2009 11:49:15 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: z15g2000yqm.googlegroups.com; posting-host=78.34.66.221; posting-account=D7TrwwoAAAAVyN71CASRiSp392RIjlsB User-Agent: G2/1.0 X-HTTP-UserAgent: Opera/9.64 (Windows NT 6.0; U; de) Presto/2.1.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:5265 Date: 2009-03-25T04:49:15-07:00 List-Id: On 25 Mrz., 12:26, Georg Bauhaus wrote: > patrick.gu...@googlemail.com schrieb: > > > Still I don=B4t get how the unconstrained type limits the > > number of instances to 1. > > It does, but outside package Singleton only. > > The (<>) forces initialization. > The "limited" part prevents assignment (thus copying). > The type is private. Now I=B4m slowly getting the point of this...it=B4s the combination of private, limited and the unconstrained type. If I don=B4t declare it as private and limited, I would be able to instantiate it, because it is visible outside the package? In this case I would be able to assign a value when declaring an instance and thus I would of course be able to create as many instances as I want to? Is this right?