Howdy,
>> help save
USAGE:
SAVE where value /header header-data
DESCRIPTION:
Saves a value or a block to a file or url.
SAVE is a native value.
>> help mold
USAGE:
MOLD value
DESCRIPTION:
Converts a value to a REBOL-readable string.
MOLD is a native value.
>> help load
USAGE:
LOAD source /header /next /library /markup
DESCRIPTION:
Loads a file, URL, or string. Binds words to global context.
LOAD is a native value.
>> load {"stringa" "stringb" "stringc"}
== ["stringa" "stringb" "stringc"]
So you can do this....
>> save %your-file1.txt ["string a" "string b" "string c"]
>> print load %your-file1.txt
string a string b string c
Or this (which retains the containing block in the file)...
>> write %your-file2.txt mold ["string a" "string b" "string c"]
>> print load %your-file2.txt
string a string b string c
Brett.
----- Original Message -----
From: <[EMAIL PROTECTED]>
To: <[EMAIL PROTECTED]>
Sent: Tuesday, August 15, 2000 10:47 AM
Subject: [REBOL] Simple question regarding saving strings to files.
> Hello again.
>
> I was just trying to write/append a series of strings
> to a .txt file and retain the format so that I get the
> following...
>
> a: "string a"
> b: "string b"
> c: "string c"
>
> How do you save the above strings to string-text.txt
> so that when I read the .txt file I get...
>
>
>
> "string a" "string b" "string c"
> "string a1" "string b1" "string c1"
>
> so that I can do a...
>
> str: read string-text.txt
> foreach [a b c][print [a b c]]
>
> Or is there a better way to do this?
>
> Thanks again,
>
> TBrownell
>
> __________________________________________________
> Do You Yahoo!?
> Yahoo! Mail - Free email you can access from anywhere!
> http://mail.yahoo.com/
>