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.9 required=5.0 tests=BAYES_00,FORGED_GMAIL_RCVD, FREEMAIL_FROM autolearn=no autolearn_force=no version=3.4.4 X-Google-Thread: 103376,ca20ac98709f9b4a X-Google-Attributes: gid103376,domainid0,public,usenet X-Google-Language: ENGLISH,ASCII-7-bit Path: g2news2.google.com!postnews.google.com!d77g2000hsb.googlegroups.com!not-for-mail From: jedivaughn Newsgroups: comp.lang.ada Subject: Re: Array of Strings Date: Wed, 24 Sep 2008 05:00:47 -0700 (PDT) Organization: http://groups.google.com Message-ID: <5a8cb0df-b16a-45d0-a03e-146ebea83e4d@d77g2000hsb.googlegroups.com> References: <0e021c61-535a-4935-95ad-2a241fa7302f@e53g2000hsa.googlegroups.com> <2VaCk.356477$yE1.321489@attbi_s21> NNTP-Posting-Host: 69.89.188.29 Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit X-Trace: posting.google.com 1222257648 14257 127.0.0.1 (24 Sep 2008 12:00:48 GMT) X-Complaints-To: groups-abuse@google.com NNTP-Posting-Date: Wed, 24 Sep 2008 12:00:48 +0000 (UTC) Complaints-To: groups-abuse@google.com Injection-Info: d77g2000hsb.googlegroups.com; posting-host=69.89.188.29; posting-account=X-qixgoAAABoVi_eyPVjiIWnxAlQQdU1 User-Agent: G2/1.0 X-HTTP-UserAgent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.0.1) Gecko/2008070208 Firefox/3.0.1,gzip(gfe),gzip(gfe) Xref: g2news2.google.com comp.lang.ada:7806 Date: 2008-09-24T05:00:47-07:00 List-Id: can anyone show me an example of using this to put string data into the array and pulling it back out. generic type Element_Type is (<>); -- everything in the list is of this type type range_array is (<>); -- the index of the array if of this type -- ads file of package package final is type recd is private; private type listy is array(range_array) of element_type; type recd is record str: listy; str_counter: integer; where: integer; end record; end final; -- adb file of main program with ada.text_IO, ada.integer_text_IO, final; procedure List_package is subtype int_range is integer range 1..25; package list is new final (element_type=> character, range_array => int_range); package list2 is new final (element_type => integer, range_array => int_range); the : list.recd; the2 : list2.recd; begin end list_package; every time I look for a place on how to do this they are using integer data. so how do you do it with string data from a file? Thanks, John