[Tutor] Dictionary Question.

S A buc40@bemail.org
Thu, 5 Sep 2002 14:15:18 -0700


Let me first setup the scenario:

I have a dictionary that contains keys that are names of people. Each one of these keys contains three items:
1.phone number
2.address
3.email

The program is set up to first ask the user to input a new key(name). Then the user is asked to enter first the phone number, followed by the address, and finally the email. This of course is repeated for many keys(names). (kinda of like an addressbook)

I want to ensure first that each item for the key is listed in the same order of input:

{key:('phone number', 'address', 'email')}

Will this be the case for every key? Or will the list for every key place the values in random order?

Next is there a way to sort the keys, say alphabetically, without disturbing the key:value relationship? (In case you have not yet noticed, I'm trying to build a simple database using dictionaries and I need to be able to enter/retrieve fields for specific relational keys)

Thanks in advance.
SA


"I can do everything on my Mac that I used to do on my PC, plus alot more ..."

-Me

------------------------------------------------------------
Free, BeOS-friendly email accounts: http://BeMail.org/
BeOS News and Community: http://www.BeGroovy.com/


---------------------------------------------------------------------
Express yourself with a super cool email address from BigMailBox.com.
Hundreds of choices. It's free!
http://www.bigmailbox.com
---------------------------------------------------------------------