comp.lang.ada
 help / color / mirror / Atom feed
* Record concatenation?
@ 2002-06-08 23:08 devine
  2002-06-09 21:07 ` Eric G. Miller
  0 siblings, 1 reply; 2+ messages in thread
From: devine @ 2002-06-08 23:08 UTC (permalink / 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?





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

end of thread, other threads:[~2002-06-09 21:07 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-06-08 23:08 Record concatenation? devine
2002-06-09 21:07 ` Eric G. Miller

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