...
>> Suppose I have an object of class Car and properties of weight and
>> maxSpeed. If I read in a config file that has some config
>> parameters for this car,
>>
>> weight: 5000
>> maxSpeed: 248
>>
>> along with a whole bunch of other parameters, is there a decent
>> way to set up my code to fill those parameters in without using a
>> bunch of case of if statements?
...
Not really an answer to your question, but this is just what a
Dictionary is for.
The read loop can be fully pararmeterized. The object could have
methods such as (I'm doing this off the top of my head without RB or
any documentation available):
Function GetFred as String
if dict = nil or not dict.HasKey("Fred") then return ""
return dict.Value("Fred")
You should be able to get the idea.
Craig
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>