[REBOL] Saving and Loading
From: mdb::gci::net at: 28-Nov-2000 14:43
Hi,
I've been using the following code for a long time to download mail,
save it to a file and load it back again.
>msgs: load/all %mailbox
>mailbox: open pop://xxx:[yyy--mail--net]
>l: length? mailbox
>if l > 0 [
>forall mailbox [ msg: import-email first mailbox
> append msgs reduce [msg/from msg/date
>msg/subject msg/content]
> ]
> save %mailbox msgs]
and everything works just fine.
But every now and again, i get a mail message whose contents contain
mismatched "{" and "}" and so the load/all produces the following:
>> load/all %mailbox
** Syntax Error: Invalid string -- {Great Stuff Tom!.
** Where: (line 295) [[larry--ecotope--com]] 15-Nov-2000/17:19:27-8:00
[REBOL] Re: Simple things should be simple to do
?
{Hi Michael
>>
I was wondering:
why does the save allow the invalid string to be saved in the first
place and
should i in fact be using save/load or maybe save the data as objects
instead.
Thanks in advance.
Mike.