comp.lang.ada
 help / color / mirror / Atom feed
From: "Randy Brukardt" <randy@rrsoftware.com>
Subject: Re: limited with
Date: Thu, 6 Oct 2005 19:04:29 -0500
Date: 2005-10-06T19:04:29-05:00	[thread overview]
Message-ID: <dOKdnYFy16IxJ9jeRVn-pw@megapath.net> (raw)
In-Reply-To: 1128604768.018159.141700@g44g2000cwa.googlegroups.com

"Lucretia" <lucretia9@lycos.co.uk> wrote in message
news:1128604768.018159.141700@g44g2000cwa.googlegroups.com...
> Hi,
>
> I finally got an example of mutually recursive "with'ing" working using
> GCC-4.2-CVS and the -gnat05 switch.
>
> Now my question is this; is it possible to do this without having to
> use access types for the limited with'd type? I did try to make one of
> my types a tagged type and remove the aliased and the 'access
> attribute, but that didn't work.

You can avoid using access types in the visible part of your specification
as long as your types are tagged. (I highly recommend this for all tagged
types, period. Leave the memory allocation up to your cleints.) But you will
have to use an access type for any objects/components of the type, because
you can't declare objects in the scope of a limited with. Essentially, in
any such case, you'll need a level of indirection somewhere (the objects
being declared/allocated in the body or in a called routine). If you can
avoid objects (which is unlikely), then you don't need any access types.

                             Randy.







  reply	other threads:[~2005-10-07  0:04 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-10-06 13:19 limited with Lucretia
2005-10-07  0:04 ` Randy Brukardt [this message]
2005-10-07  2:40 ` Anh Vo
2005-10-07 16:30   ` Anh Vo
replies disabled

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox