comp.lang.ada
 help / color / mirror / Atom feed
From: Niklas Holsti <nholsti@icon.fi>
Subject: Re: Department of Stupid Questions, please...
Date: 1999/03/22
Date: 1999-03-22T00:00:00+00:00	[thread overview]
Message-ID: <36F69B66.A498DA5E@icon.fi> (raw)
In-Reply-To: 36F59EFA.DAA7D1B6@oit.edu

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.




      reply	other threads:[~1999-03-22  0:00 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1999-03-21  0:00 Department of Stupid Questions, please default
1999-03-22  0:00 ` Niklas Holsti [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