From: Tim Rowe <spamtrap@tgrowe.plus.net>
Subject: Re: Newbie question -- dereferencing access
Date: Thu, 12 Mar 2009 09:57:08 +0000
Date: 2009-03-12T09:57:08+00:00 [thread overview]
Message-ID: <OZGdneh8guLrQSXUnZ2dnUVZ8gKWnZ2d@posted.plusnet> (raw)
In-Reply-To: <f05febe5-7bd4-41ee-b366-10db56397230@p20g2000yqi.googlegroups.com>
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.
next prev parent reply other threads:[~2009-03-12 9:57 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 [this message]
2009-03-12 10:16 ` Ludovic Brenta
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