comp.lang.ada
 help / color / mirror / Atom feed
From: "devine" <devine@linuxmail.org>
Subject: Record concatenation?
Date: Sat, 08 Jun 2002 23:08:57 GMT
Date: 2002-06-08T23:08:57+00:00	[thread overview]
Message-ID: <d8wM8.115863$Ka.8171211@news2.calgary.shaw.ca> (raw)

Can someone tell me how to concant records in ada? For example say you have
a record:

TYPE Sales IS RECORD
  SaleNo : Integer;
  SalesmanNo : String(1..20);
END RECORD;
SalesData : Array(1..10) OF Sales;

The data for the record is read from a file, say the file contains:
1234 Some Name
1234 Some Name
1235 Someone Else

What is the easiest way to join the first 2 records so that if you write
back to the file or display the data to the screen it displays:
1234 Some Name
1235 Someone Else

I was thinking of checking if the previous number was the same as the next
number and then add the previous number to a subtotal, and if the number was
diff it would do to the next number and so on. Is thier a simpler way?





             reply	other threads:[~2002-06-08 23:08 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-06-08 23:08 devine [this message]
2002-06-09 21:07 ` Record concatenation? Eric G. Miller
replies disabled

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