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=0.1 required=5.0 tests=BAYES_05,INVALID_MSGID autolearn=no autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,9b17a1f51a26de9d X-Google-Attributes: gid103376,public From: arthurw@bigfoot.com.ignore.this.net (Arthur Ward) Subject: Re: An array of records within an array of records (Still a problem) Date: 1998/05/02 Message-ID: <354b2695.37415661@news.ua.edu>#1/1 X-Deja-AN: 349596453 References: <354AEE03.424DC998@none.com> Organization: The University of Alabama, Tuscaloosa Newsgroups: comp.lang.ada Date: 1998-05-02T00:00:00+00:00 List-Id: On Sat, 02 May 1998 10:57:24 +0100, R Mullen wrote: >> type cd_track_array is array(1..3) of cd_track; >> new_cd_track:cd_track_array; >> >> type cd is >> record >> title:string(1..20); >> artist:string(1..20); >> id:new_cd_track; >> tracks:integer; >> end record; >> >> type cd_array is array(1..3) of cd; >> new_cd_array:cd_array; >> >> begin >> new_cd_array(1):=("qqqqqqqqqqqqqqqqqqqq","qqqqqqqqqqqqqqqqqqqq",("qqqqqqqqqqqqqqqqqqqq","qqqqqqqqqqqqqqqqqqqq",0.34,1),3); >> put(new_cd_array(1).id(1).title); >> > I am specifying the ID of the CD to the array of CD Tracks. I would of >thought it would work but as of yet it still wont. Although I have asked >this before the responses weren't really concerning the actual problem. Your assignment of one CD only contains data for one cd_track; the cd record contains a new_cd_track (how, I'm not sure; I would expect you'd have to use a type in the declaration, not a variable, but hey, whatever works), and a new_cd_track is an array of 3 cd_tracks. So, your assignment needs to be a bit uglier, along the lines of: new_cd_array(1):=(title,artist,((cd_track1),(cd_track2),(cd_track3)),tracks); Note the array aggregate containing the cd_track aggregates. - Arthur (arthurw at bigfoot.com)