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,6b321c404393abd0 X-Google-Attributes: gid103376,public From: Niklas Holsti Subject: Re: Department of Stupid Questions, please... Date: 1999/03/22 Message-ID: <36F69B66.A498DA5E@icon.fi>#1/1 X-Deja-AN: 457657137 Content-Transfer-Encoding: 7bit References: <36F59EFA.DAA7D1B6@oit.edu> Content-Type: text/plain; charset=us-ascii X-Trace: read2.inet.fi 922129823 194.252.1.58 (Mon, 22 Mar 1999 21:10:23 EET DST) Organization: Space Systems Finland Ltd MIME-Version: 1.0 NNTP-Posting-Date: Mon, 22 Mar 1999 21:10:23 EET DST Newsgroups: comp.lang.ada Date: 1999-03-22T00:00:00+00:00 List-Id: default wrote: ... > > I am taking a class on Ada and I am absolutely stuck in a lab. I need > to open a comma delimited file, read it's contents into a variant > record, display the contents of the record, and then get the next > record. So far I can open the file without a problem, it is the reading > the comma delimited records into the variant records where I am hitting > a wall. I would tag on my code with this message, but right at the > moment it is a garbled mess from me trying a bajillion different > approaches to the problem. > > Essentially, I am looking for pointers on working with variant records. > Any information will be hugely appreciated! If I understand correctly, you are opening a text file, where each line is a sequence of fields, separated by commas, and you want to read a line at a time, store the fields in a variant record, and then display the record, for each line. I find I can't advise you without knowing which feature of the input file is creating a need for variants of the Ada record. Is the number of fields per line variable? Is the type of the fields variable (number, string, ...)? > Thank you in advance! > > Lonnie Mathis, wannabe graduating senior... Happy to help, when I can. Niklas Holsti Working at but not speaking for Space Systems Finland Ltd.