From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.3 required=5.0 tests=BAYES_00,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,177ff20edf7f64cf X-Google-Attributes: gid103376,public From: dweller@dfw.net (David Weller) Subject: Re: Unconstrained array aggregation..sq. peg into round hole? Date: 1996/03/20 Message-ID: <4ip79b$57c@dfw.dfw.net>#1/1 X-Deja-AN: 143350064 references: <4ihrvo$hs5@dfw.dfw.net> organization: DFWNet -- Public Internet Access newsgroups: comp.lang.ada Date: 1996-03-20T00:00:00+00:00 List-Id: In article , Jon S Anthony 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