Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Jul 12th, 2006, 3:59 PM   #21
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,035
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
I see. If there's a certain order they have to be in. That most likely implies you know which index each item is at, right? So why not use a list?

If not, you could still use a list, and make each item a tuple, containing the key and the value.

Lastly. If there's a method to the order, defined by the keys. You could always make a function that sorts it out in to a list before you need to use it.
Sane is offline   Reply With Quote
Old Jul 13th, 2006, 6:44 AM   #22
Cerulean
Professional Programmer
 
Cerulean's Avatar
 
Join Date: Apr 2005
Location: London, England
Posts: 459
Rep Power: 4 Cerulean is on a distinguished road
titaniumdecoy: Maybe you should have posted all of these requirements from the start. Your question has evolved from "how do I make a human-readable config file in the form foo=bar" to "how do I do that AND it must support loading tuples AND the keys must be in the specified order". We would have saved a whole lot of time if you had.
Cerulean is offline   Reply With Quote
Old Jul 13th, 2006, 9:03 AM   #23
Sane
Programming Guru
 
Sane's Avatar
 
Join Date: Apr 2005
Location: Waterloo, Ontario
Posts: 2,035
Rep Power: 6 Sane will become famous soon enough
Send a message via MSN to Sane
Haha. I most certainly agree!
Sane is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Storing Data crawforddavid2006 C++ 11 Jun 24th, 2006 1:41 PM
Storing passed information into a text file dunowhodoyou PHP 9 May 8th, 2006 11:29 AM
Storing variables to a file? Oddball PHP 2 Mar 21st, 2006 3:09 PM
Storing Negative Numbers in unsigned ints aznluvsmc C 9 Aug 22nd, 2005 11:09 PM
Language preferences peace_of_mind Coder's Corner Lounge 7 Apr 1st, 2005 1:52 PM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 7:51 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC