From: Spamguard@yahoo.com (Alex Strabismus)
Subject: Multilists
Date: Wed, 04 Aug 2004 12:40:50 GMT
Date: 2004-08-04T12:40:50+00:00 [thread overview]
Message-ID: <mP4Qc.41048$lW3.2216889@wagner.videotron.net> (raw)
Hello --
I have a list of clients that I need to be kept sorted IN MEMORY by primary key
and secondary keys.
ID: 1
Name: Bob Quintal
AmountDue: 432
ID: 2
Name: Alex Strabismus
AmountDue: 321
So say I throw in the command Display(ID), it displays by ID, as you see in the
example, above. However, Display (Name) will
display the list in alphabetic order, starting with Alex Strabismus. The same
for Display (AmountDue), since 321<432. My
idea is to insert in a list, with three pointers-->next for each data type:
After each insertion into the list, the program
comes up with a proper pointer.
Ex: Insert:
ID: 1
Name: Bob Quintal
AmountDue: 432
1 points to nothing
Bob Quintal points to nothing
Amount Due points to nothing.
Insert:
ID: 2
Name: Alex Strabismus
AmountDue: 321
2 points to nothing
Alex Strabismus points to Bob Quintal
321 points to 432
Do you have any examples of this -- packages WITH implementation? Is this a
'multimap' or 'multilist'? Make sure to provide
an example with a RECORD type, as above. I am new to ADA and will not be able
to correlate, say, an example using plain
integers.
Thanks!
Alex Strabismus
Montreal, Canada
next reply other threads:[~2004-08-04 12:40 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-08-04 12:40 Alex Strabismus [this message]
2004-08-04 15:18 ` Multilists Martin Dowie
replies disabled
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox