From: Adam Beneschan <adambeneschan@gmail.com>
Subject: Re: pointers and protected objects
Date: Fri, 17 Oct 2014 08:42:06 -0700 (PDT)
Date: 2014-10-17T08:42:06-07:00 [thread overview]
Message-ID: <b179edea-bceb-40b5-a243-2ae021d846a0@googlegroups.com> (raw)
In-Reply-To: <a1e35ccf-2ff5-4d37-af48-df135942add2@googlegroups.com>
On Friday, October 17, 2014 5:51:43 AM UTC-7, tonyg wrote:
> 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
That syntax would mean that a new protected object would be created and Po_Type_Instance would be copied to it. But you can't copy protected objects.
You can, however, say
po_ptr := new Po_Type;
or
po_ptr := new Po_Type'(Some_Function(...));
where Some_Function is a function that returns a Po_Type.
-- Adam
next prev parent reply other threads:[~2014-10-17 15:42 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-10-17 12:51 pointers and protected objects tonyg
2014-10-17 13:20 ` Simon Wright
2014-10-17 14:51 ` tonyg
2014-10-17 15:36 ` Simon Wright
2014-10-17 17:21 ` AdaMagica
2014-10-17 15:42 ` Adam Beneschan [this message]
2014-10-23 8:54 ` tonyg
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox