Mailing List Archive: 49091 messages
  • Home
  • Script library
  • AltME Archive
  • Mailing list
  • Articles Index
  • Site search
 

[REBOL]

From: coussement:c:itc:mil:be at: 7-Nov-2000 13:23

I'm now stopped in my developping work by following problem. I would like to store data into a file (on the HD) in a nested block structure, but I cannot find an elegant way to compose it from raw data:
>> b: make block! []
== []
>> append b "the-name"
== ["the-name"]
>> append b "123456"
== ["the-name" "123456"]
>> append b [123456]
== ["the-name" "123456" 123456]
>> append b ["123456"]
== ["the-name" "123456" 123456 "123456"]
>> write %_test.txt b >> read %_test.txt
== "the-name123456123456123456"
>> bb: to-block read %_test.txt
== [the-name123456123456123456] When I would like to get in the file something like : ["the-name" "123456" 123456 "123456"] or [["the-name"] ["123456"] [123456] ["123456"]] So I can use an easy-to-follow path notation to retrieve elements dynamicaly. Any idea ? Best regards ;-) C. COUSSEMENT