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

Saving blocks?l

 [1/3] from: al:bri:xtra at: 16-Mar-2001 21:17


Stefan wrote:
> How should I save it so I get it in the original state?
; save the value refered to by the word 'user-db. save %user-db.r user-db ; load the value saved from above and refer to it with the word 'user-db. user-db: load %user-db.r
> user-db: [ > User [
<<quoted lines omitted: 3>>
> ] > ]
The above value is better as: [ [Name Surname eMail] "John" "Doe" [john--doe--noone--com] ] as it saves space. I hope that helps! Andrew Martin ICQ: 26227169 http://members.nbci.com/AndrewMartin/

 [2/3] from: stefan::falk::slg::se at: 15-Mar-2001 16:32


Hi list, I'm having a slight problem here, I'll try to explain it. First, I have a file named user-db.r that contains info like this: REBOL [] user-db: [ User [ Name "John" Surname "Doe" E-Mail [john--doe--noone--com] ] ] etc. etc.. I read it into a script using user-db: do %user-db.r all fine, I edit some of the values (for example change the surname to Doh ). And then I want to save it, so I can read it in with do %user-db.r again. And here come the problem, when I save (using save/header) it, the user-db: [] block disappears. All I get is REBOL [] User [ Name "John" Surname "Doh" E-Mail [john--doe--noone--com] ] How should I save it so I get it in the original state? Thanks! /Regards Stefan

 [3/3] from: ptretter:norcom2000 at: 15-Mar-2001 17:54


Not sure anyone answered you but why not use load and write instead. Paul Tretter.

Notes
  • Quoted lines have been omitted from some messages.
    View the message alone to see the lines that have been omitted