comp.lang.ada
 help / color / mirror / Atom feed
From: dweller@dfw.net (David Weller)
Subject: Re: Unconstrained array aggregation..sq. peg into round hole?
Date: 1996/03/20
Date: 1996-03-20T00:00:00+00:00	[thread overview]
Message-ID: <4ip79b$57c@dfw.dfw.net> (raw)
In-Reply-To: JSA.96Mar19204126@organon.com

In article <JSA.96Mar19204126@organon.com>,
Jon S Anthony <jsa@organon.com> wrote:
>In article <4ihrvo$hs5@dfw.dfw.net> dweller@dfw.net (David Weller) writes:
>
>>[example code deleted]
>Table is a 2 dimensional array with float components.  The error line
>shows an attempt to only specify one index of the two required.  Two
>dimensional arrays do not have Pascal array of array semantics.  You
>have to write that if it is what you want.  Of course here, you can't
>quite do that because you can't have an indefinite type be a component
>of an array (the potential Real_Array part).  The typical trick is to
>use an array of pointers to unconstrained array type.
>
>see 3.6(10, 12, 13)
>

Yup.  Actually the solution was to create something like a
"Load_Vector_From_Table" function.  That worked out pretty well.  I
knew about the "ragged array" solution, but I was looking something
with a more C-like flavor to it.  All things considered, the call to
the function actually turned out to be more readable for the target
audience (most of whom are highly Ada-illiterate).

I thank everybody for their comments.  In the end, things were just as
I had expected, but I thought maybe, just maybe, there was something
about Ada 95 that I missed :-)

-- 
		    GNAT = GNAT is Not an Ada Translator
==Ada 95 Booch Components: www.ocsystems.com/booch or www.dfw.net/~dweller==
Reality: Work, Work, Work, Guitar.         | Plugged: Fender Telecaster Deluxe
Fantasy: Guitar, Guitar, Guitar, Work(ha!) | Unplugged: Yamaha CG-150SA




      reply	other threads:[~1996-03-20  0:00 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1996-03-17  0:00 Unconstrained array aggregation..sq. peg into round hole? David Weller
1996-03-19  0:00 ` Ted Dennison
1996-03-19  0:00   ` Robert Dewar
1996-03-19  0:00 ` Unconstrained array aggregation..sq. peg i John Hutchison x2141
1996-03-20  0:00 ` Unconstrained array aggregation..sq. peg into round hole? Robert I. Eachus
1996-03-20  0:00   ` Robert A Duff
1996-03-20  0:00     ` Keith Thompson
1996-03-21  0:00   ` Robert I. Eachus
1996-03-22  0:00     ` Robert Dewar
1996-03-25  0:00   ` Robert I. Eachus
1996-03-25  0:00     ` Robert Dewar
1996-03-20  0:00 ` Jon S Anthony
1996-03-20  0:00   ` David Weller [this message]
replies disabled

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