comp.lang.ada
 help / color / mirror / Atom feed
* Department of Stupid Questions, please...
@ 1999-03-21  0:00 default
  1999-03-22  0:00 ` Niklas Holsti
  0 siblings, 1 reply; 2+ messages in thread
From: default @ 1999-03-21  0:00 UTC (permalink / raw)


Hello!

Alright, to begin with I have experience in several programming
languages, from assembly to OOP, and now I find myself delving into Ada.

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!

Thank you in advance!

Lonnie Mathis, wannabe graduating senior...





^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: Department of Stupid Questions, please...
  1999-03-21  0:00 Department of Stupid Questions, please default
@ 1999-03-22  0:00 ` Niklas Holsti
  0 siblings, 0 replies; 2+ messages in thread
From: Niklas Holsti @ 1999-03-22  0:00 UTC (permalink / raw)


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.




^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~1999-03-22  0:00 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-03-21  0:00 Department of Stupid Questions, please default
1999-03-22  0:00 ` Niklas Holsti

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox