From: Victor Porton <porton@narod.ru>
Subject: Re: We should introduce aliased types
Date: Fri, 01 Aug 2014 22:57:21 +0300
Date: 2014-08-01T22:57:21+03:00 [thread overview]
Message-ID: <lrgret$mj8$1@speranza.aioe.org> (raw)
In-Reply-To: lrgqst$4no$1@loke.gir.dk
Randy Brukardt wrote:
> "Victor Porton" <porton@narod.ru> wrote in message
> news:lrgp2h$h3n$1@speranza.aioe.org...
> ...
>> One situation in which we need aliased types (not a single aliased
>> variable)
>> is Initialize() procedure for controlled types.
>
> This is already true. Controlled types are by-reference, so it's legal to
> take 'Access of a subprogram parameter of the type. Specifically:
>
> procedure Initialize (Obj : T) is
> begin
> Obj.Ptr := T'Unchecked_Access;
> end Initialize;
>
> is legal.
>
> Did you actually try this before writing??
Sorry, Randy. I've tried but not with a tagged type. Now I see it does
already work with tagged types.
--
Victor Porton - http://portonvictor.org
next prev parent reply other threads:[~2014-08-01 19:57 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-08-01 18:54 We should introduce aliased types Victor Porton
2014-08-01 18:56 ` Victor Porton
2014-08-01 19:16 ` Victor Porton
2014-08-01 19:47 ` Randy Brukardt
2014-08-01 19:57 ` Victor Porton [this message]
2014-08-01 19:44 ` Randy Brukardt
2014-08-01 19:49 ` Randy Brukardt
2014-08-01 20:39 ` sbelmont700
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox