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!news.eternal-september.org!mx02.eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail From: Simon Wright Newsgroups: comp.lang.ada Subject: Re: pointers and protected objects Date: Fri, 17 Oct 2014 14:20:25 +0100 Organization: A noiseless patient Spider Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="110351425d23d895aa4e17b47c8a8886"; logging-data="7227"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX19+ZNaVeo2ierzWipxpv+Z3RP95Wp3Xojk=" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (darwin) Cancel-Lock: sha1:nHqa91Bf/gVuLkgidjFCD78pyA0= sha1:yCB+dPAc5ocNn3lm/5DBi6sXZgY= Xref: news.eternal-september.org comp.lang.ada:22548 Date: 2014-10-17T14:20:25+01:00 List-Id: tonyg writes: > I can create pointers to protected objects, but how do I initialise > the protected object as it is a limited type and the syntax > > po_ptr := new Po_Type'(Po_Type_Instance) would not be allowed So far as I am aware, you can't; the PO needs to be self-initializing (you can give the protected type discriminants, which may help)