Francois wrote:
> Guys, I need to convert a large flat-file with our router list into a
rebol
block database so I can easily manipulate and update data.
> router1;serial1;description;up;speed
> router1;serial2;description;down;speed
> router2;serial1;description;up;speed
> router2;serial2;description;up;speed
> router2;serial3;description;down;speed
> What is the best way to achieve this for the best flexibility
Given the above, I would go for a quick solution like this:
Router: [
[
Serial [
[
Description "blah"
State Up
Rate speed
]
[
Description "blah"
State Down
Rate speed
]
]
]
[
Serial [
[
Description "blah"
State Up
Rate speed
]
[
Description "blah"
State Up
Rate speed
]
[
Description "blah"
State Down
Rate speed
]
]
]
]
Which in REBOL allows:
>> Router/2/Serial/2/Description
== "blah"
>> Router/2/Serial/2/State
== Up
>> Router/2/Serial/2/Rate
== speed
Andrew Martin
ICQ: 26227169
http://members.xoom.com/AndrewMartin/
-><-