From: mheaney@ni.net (Matthew Heaney)
Subject: Re: renaming Interfaces.Java.Ada_To_Java_String to the + operator
Date: 1998/01/25
Date: 1998-01-25T00:00:00+00:00 [thread overview]
Message-ID: <mheaney-ya023680002501980844030001@news.ni.net> (raw)
In-Reply-To: 199801191436.PAA25860@basement.replay.com
In article <199801191436.PAA25860@basement.replay.com>, nobody@REPLAY.COM
(Anonymous) wrote:
>I've been developing software professionally since 1975, and using Ada
>since 1984, and I only recently encountered this "old idiom" by reading
>about it here. Perhaps it is familiar only to those involved in the
>language design and implementation. I know I never encountered it in 14
>years of reading the ARM, Ada texts, and Ada-related articles.
This technique was discussed in John Barnes' book, Programming In Ada. He
used it to construct a ragged array of strings. Actually, that turns out
to be a popular use of the identity operator, to populate an array:
declare
Aardvark : aliased constant String := "aardvark";
...
Elephant : aliased constant String := "elephant";
...
Zebra : aliased constant String := "zebra";
type String_Access_Constant is access constant String;
type String_Array is
array (Positive range <>) of String_Access_Constant;
Animals : constant String_Array :=
(Aardvark'Access,
...
Elephant'Access,
...
Zebra'Access);
begin
This is more or less the example in John's book. (His Ada 83 example put
the strings on the heap, using the identity operator to hide to allocator
invokation.)
--------------------------------------------------------------------
Matthew Heaney
Software Development Consultant
<mailto:matthew_heaney@acm.org>
(818) 985-1271
next prev parent reply other threads:[~1998-01-25 0:00 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-01-11 0:00 renaming Interfaces.Java.Ada_To_Java_String to the + operator Terry J. Westley
1998-01-10 0:00 ` Robert Dewar
1998-01-10 0:00 ` Matthew Heaney
1998-01-13 0:00 ` Tom Moran
1998-01-13 0:00 ` Robert Dewar
1998-01-13 0:00 ` Stephen Leake
1998-01-13 0:00 ` Nick Roberts
1998-01-13 0:00 ` Stephen Leake
[not found] ` <En3Cxz.7HD@world.std.com>
1998-01-20 0:00 ` Robert Dewar
1998-01-21 0:00 ` Stephen Leake
1998-01-22 0:00 ` Robert Dewar
1998-01-22 0:00 ` Anonymous
[not found] ` <dewar.885498969@merv>
1998-01-23 0:00 ` Geert Bosch
1998-01-23 0:00 ` Tom Moran
1998-01-23 0:00 ` Anonymous
1998-01-24 0:00 ` Tucker Taft
1998-01-11 0:00 ` Chris Morgan
1998-01-11 0:00 ` Robert Dewar
1998-01-11 0:00 ` Chris Morgan
1998-01-11 0:00 ` Robert Dewar
1998-01-11 0:00 ` Chris Morgan
1998-01-11 0:00 ` Robert Dewar
1998-01-11 0:00 ` Nick Roberts
1998-01-11 0:00 ` Brian Rogoff
1998-01-13 0:00 ` Terry J. Westley
1998-01-14 0:00 ` Robert Dewar
1998-01-15 0:00 ` Nick Roberts
1998-01-15 0:00 ` Robert Dewar
1998-01-16 0:00 ` Michael F Brenner
1998-01-16 0:00 ` Robert Dewar
1998-01-16 0:00 ` Nick Roberts
1998-01-16 0:00 ` Robert Dewar
1998-01-17 0:00 ` miniscences Nick Roberts
1998-01-17 0:00 ` miniscences Robert Dewar
1998-01-19 0:00 ` renaming Interfaces.Java.Ada_To_Java_String to the + operator Anonymous
1998-01-25 0:00 ` Matthew Heaney [this message]
1998-01-11 0:00 ` Robert Dewar
1998-01-14 0:00 ` Anonymous
1998-01-14 0:00 ` Robert Dewar
1998-01-12 0:00 ` Tucker Taft
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox