Thanks for the 'compose lesson.  I've never had to use it.
I can get something close to what I want, but I still am having
trouble getting the following to work.

Here is one file %in.dat:

REBOL []
[
ss
[
        item1 "hello"
        item2 "goodbye"
]

other
[
        n "bad"
]
]



Fine.  Now a console session....

>> sprops: do %in.dat
== [
    ss
    [
        item1 "hello"
        item2 "goodbye"
    ]
    other
    [
        n "bad"
    ]
]

>>save/header %out.dat sprops []

Here is what %out.dat then contains:

REBOL []

ss 
[
    item1 "hello" 
    item2 "goodbye"
] 
other 
[
    n "bad"
]

Not what I want.  I want (expect) to see exactly what is in
the file %in.dat.  So I say, OK, use compose/deep to enclose
the thing in a block.  The following:

>>save/header %out.dat compose/deep [(sprops)] []

gives the same %out.dat as before.  And this:

>>save/header %out.dat compose/deep [[(sprops)]] []

makes %out.dat look like the following:

REBOL []
[[
        ss 
        [
            item1 "hello" 
            item2 "goodbye"
        ] 
        other 
        [
            n "bad"
        ]]]

As you can see there are is now an extra enclosing block instead of just
one!!!

How do I save sprops, which has the exact form I want, to %out.dat so it
looks exactly like %in.dat???

TIA,

Rodney

Reply via email to