comp.lang.ada
 help / color / mirror / Atom feed
* limited with
@ 2005-10-06 13:19 Lucretia
  2005-10-07  0:04 ` Randy Brukardt
  2005-10-07  2:40 ` Anh Vo
  0 siblings, 2 replies; 4+ messages in thread
From: Lucretia @ 2005-10-06 13:19 UTC (permalink / raw)


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.

Thanks,
Luke.




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: limited with
  2005-10-06 13:19 limited with Lucretia
@ 2005-10-07  0:04 ` Randy Brukardt
  2005-10-07  2:40 ` Anh Vo
  1 sibling, 0 replies; 4+ messages in thread
From: Randy Brukardt @ 2005-10-07  0:04 UTC (permalink / raw)


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







^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: limited with
  2005-10-06 13:19 limited with Lucretia
  2005-10-07  0:04 ` Randy Brukardt
@ 2005-10-07  2:40 ` Anh Vo
  2005-10-07 16:30   ` Anh Vo
  1 sibling, 1 reply; 4+ messages in thread
From: Anh Vo @ 2005-10-07  2:40 UTC (permalink / raw)


It is interesting to the fact that gcc-4.1 exists while gcc-4.1.0 has
not been released yet. It is currently at stage 3. Did you mean
gcc-4.0.2?

AV




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: limited with
  2005-10-07  2:40 ` Anh Vo
@ 2005-10-07 16:30   ` Anh Vo
  0 siblings, 0 replies; 4+ messages in thread
From: Anh Vo @ 2005-10-07 16:30 UTC (permalink / raw)


I guess made a typo, too. I meant .. that gcc-4.2 exists ..

Anh Vo wrote:
> It is interesting to the fact that gcc-4.1 exists while gcc-4.1.0 has
> not been released yet. It is currently at stage 3. Did you mean
> gcc-4.0.2?
> 
> AV




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2005-10-07 16:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2005-10-06 13:19 limited with Lucretia
2005-10-07  0:04 ` Randy Brukardt
2005-10-07  2:40 ` Anh Vo
2005-10-07 16:30   ` Anh Vo

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