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

[REBOL] Keeping line format when saving blocks into a file

From: coussement::c::itc::mil::be at: 1-Dec-2000 9:08

Hi REBOL's: I think there's already be a discussion about it, but I cannot find the thread back... I would like to create a navigational structure - block-based - and introduce line formatting into it -for the readability of the file. Let's show:
>> b: copy []
== []
>> append b [key1 [data1 data2]]
== [key1 [data1 data2]]
>> append b newline
== [key1 [data1 data2] #"^/"]
>> append b [key2 [data3 data4]]
== [key1 [data1 data2] #"^/" key2 [data3 data4]]
>> save %b.txt >>
When opening the file into a text editor, I read : key1 [data1 data2] #"^/" key2 [data3 data4] And I would like to read : key1 [data1 data2] key2 [data3 data4] Of course, should I use write or write/string, to resolve the 'newline', then the blocks are gone :
>> write %b.txt >>
the file becomes: key1data1 data2 key2data3 data4 which is not what I'm looking for ! Any ideas ? Regards, Christophe