From: Ludovic Brenta <ludovic@ludovic-brenta.org>
Subject: Re: Newbie question -- dereferencing access
Date: Thu, 12 Mar 2009 03:16:51 -0700 (PDT)
Date: 2009-03-12T03:16:51-07:00 [thread overview]
Message-ID: <15ae052a-ce4e-4c19-922e-0704bf0b4a3f@e38g2000yqa.googlegroups.com> (raw)
In-Reply-To: OZGdneh8guLrQSXUnZ2dnUVZ8gKWnZ2d@posted.plusnet
On Mar 12, 10:57 am, Tim Rowe <spamt...@tgrowe.plus.net> wrote:
> Ludovic Brenta wrote:
> > On Mar 11, 9:26 pm, Tim Rowe <spamt...@tgrowe.plus.net> wrote:
> >> If I have an access variable, for example:
> >> s: access string := new String'("Foo");
> >> is there an easy way to assign from s to a string variable? Obviously I
> >> can't assign it directly, because access string is not string, so how do
> >> I convert? Everything I read says that dereferences happen
> >> automatically, but in this situation!
>
> > Copy_Of_S : String := s.all;
>
> > This also works when passing parameters, e.g.
>
> > procedure P (Str : in String) is null;
> > begin
> > P (s.all);
>
> Perfect! Thanks.
>
> Can you (or anyone else) suggest a good book or online tutorial for an
> existing programmer, wanting to add Ada to his language portfolio? I
> have John Barnes "Programming in Ada 95", but I don't find his
> explanations very clear (and I couldn't find the answer to the question
> above), so if there's something better out there it might be worth me
> getting it.
The Ada Programing wikibook has received a lot of praise and has a
complete chapter discussing access types:
http://en.wikibooks.org/wiki/Ada_Programming/Types/access
See also the books and tutorials listed at http://www.adaic.com/learn/index.html
--
Ludovic Brenta.
next prev parent reply other threads:[~2009-03-12 10:16 UTC|newest]
Thread overview: 30+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-03-11 20:26 Newbie question -- dereferencing access Tim Rowe
2009-03-11 20:46 ` Ludovic Brenta
2009-03-12 9:57 ` Tim Rowe
2009-03-12 10:16 ` Ludovic Brenta [this message]
2009-03-12 13:24 ` Tim Rowe
2009-03-12 12:13 ` christoph.grein
2009-03-12 13:00 ` Tim Rowe
2009-03-12 13:30 ` Ed Falis
2009-03-13 9:55 ` Tim Rowe
2009-03-13 11:06 ` Alex R. Mosteo
2009-03-13 16:31 ` Tim Rowe
2009-03-13 16:52 ` Georg Bauhaus
2009-03-13 17:31 ` Tim Rowe
2009-03-13 18:18 ` Tim Rowe
2009-03-13 18:27 ` Pascal Obry
2009-03-13 18:46 ` Niklas Holsti
2009-03-13 21:38 ` Tim Rowe
2009-03-13 22:28 ` Per Sandberg
2009-03-13 16:52 ` Tim Rowe
2009-03-13 17:33 ` Martin
2009-03-14 7:30 ` sjw
2009-03-14 7:45 ` sjw
2009-03-14 9:21 ` Martin
2009-03-23 8:43 ` Martin
2009-03-16 8:30 ` Alex R. Mosteo
2009-03-13 16:50 ` Tim Rowe
2009-03-13 16:19 ` Martin
2009-03-12 16:43 ` qunying
2009-03-12 18:21 ` Ivan Levashew
2009-03-13 5:59 ` christoph.grein
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox