[REBOL] Re: (No subject)Date: Sat, 11 Nov 2000 11:36:19 +1100
From: brett::codeconscious::com at: 10-Nov-2000 16:36
Hi,
Saving your data
Consider using the SAVE function or the MOLD function.
Type HELP SAVE at the console.
>> a: ["the-name" "123456" 123456 "123456"]
== ["the-name" "123456" 123456 "123456"]
>> save %tf.txt a
>> a-retrieved: load %tf.txt
== ["the-name" "123456" 123456 "123456"
]
>> equal? a a-retrieved
== true
>> b: [["the-name"] ["123456"] [123456] ["123456"]]
== [["the-name"] ["123456"] [123456] ["123456"]]
>> save %b.txt b
>> b-retrieved: load %b.txt
== [["the-name"] ["123456"] [123456] ["123456"]
]
>> equal? b b-retrieved
== true
Creating your data
You mentioned composing it - did you try looking at the COMPOSE function -
nay be useful to you.
Here's a bunch of lines that might inspire some ideas.
>> c: copy []
== []
>> append c "a string"
== ["a string"]
>> append/only c reduce ["string in a nested block"]
== ["a string" ["string in a nested block"]]
>> reference-to-a-block: copy/deep c
== ["a string" ["string in a nested block"]]
>> append/only c reference-to-a-block
== ["a string" ["string in a nested block"] ["a string" ["string in a
nested block"]]]
>> append reference-to-a-block "Appended into the block."
== ["a string" ["string in a nested block"] "Appended into the block."]
>> c
== ["a string" ["string in a nested block"] ["a string" ["string in a
nested block"] "Appended in
to the block."]]
In regards to structuring the data. I think it really depends on how you
want to update and access it. Some structures are easier to create and
harder to read, others harder to create and easier to read. It really
depends on what you are doing. That said, having a favourite structure can
be useful too, because then multiple programs can pass it around and work on
it.
Hope it helps.
Brett.
----- Original Message -----
From: "CRS - Psy Sel/SPO, COUSSEMENT Christophe, CPN"
<[COUSSEMENT--C--ITC--mil--be]>