comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: We should introduce aliased types
Date: Fri, 1 Aug 2014 14:47:41 -0500
Date: 2014-08-01T14:47:41-05:00	[thread overview]
Message-ID: <lrgqst$4no$1@loke.gir.dk> (raw)
In-Reply-To: lrgp2h$h3n$1@speranza.aioe.org

"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??

                                       Randy.


  reply	other threads:[~2014-08-01 19:47 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 [this message]
2014-08-01 19:57     ` Victor Porton
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