comp.lang.ada
 help / color / mirror / Atom feed
* Multilists
@ 2004-08-04 12:40 Alex Strabismus
  2004-08-04 15:18 ` Multilists Martin Dowie
  0 siblings, 1 reply; 2+ messages in thread
From: Alex Strabismus @ 2004-08-04 12:40 UTC (permalink / 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




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

* Re: Multilists
  2004-08-04 12:40 Multilists Alex Strabismus
@ 2004-08-04 15:18 ` Martin Dowie
  0 siblings, 0 replies; 2+ messages in thread
From: Martin Dowie @ 2004-08-04 15:18 UTC (permalink / raw)


"Alex Strabismus" <Spamguard@yahoo.com> wrote in message news:mP4Qc.41048
> 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.

See the 'Charles' container library @ http://charles.tigris.org/

It supports multimaps and multisets.





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

end of thread, other threads:[~2004-08-04 15:18 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-08-04 12:40 Multilists Alex Strabismus
2004-08-04 15:18 ` Multilists Martin Dowie

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