Save and series

Discussion in 'Rebol' started by MaxV, Jul 14, 2011.

  1. MaxV

    MaxV Member

    Hello everybody,
    I noticed that there is a difference between this 2 blocks:
    Code:
    >> a: [ 1 2
    [    3 4]
    == [1 2 
        3 4
    ]
    >> b: [1 2 3 4 ]
    == [1 2 3 4]
    
    a series contains some type of carriage return.
    If I use a lot of data, saving them on a file, I see all data printed one after another; it's very difficult to read.
    I'd like to see them pretty printed.
    If I use the load function on a pretty printed file, it maintains the carriage return,
    example the file temp.txt:
    Code:
    1 2
    3 4
    
    If I use the command:
    Code:
    a: load %temp.txt
    [1 2
    3 4]
    save %temp2.txt a
    But every datat I append or insert are inserted inline.
    How can I insert the carriage return in a series and use save?
  2. Graham

    Graham Developer Staff Member

    Can't you just append a CR as well?
  3. MaxV

    MaxV Member

    Well, if I use a lot of data (a big table for example), I have a serires like: [a1 a2 a3 b1 b2 b3]
    I prefer to save in the format:
    [
    a1 a2 a3
    b1 b2 b3
    ]

    But I don't know how to append add a CR to a series that is not considered an element of the series...
    Examples:
    Code:
    >> a: [a1 a2 a3
         b1 b2 b3]
    == [a1 a2 a3
        b1 b2 b3]
    >> length? a
    == 6
    >> b: [a1 a2 a3 "^/" b1 b2 b3]
    == [a1 a2 a3 "^/" b1 b2 b3]
    >> length? b
    == 7
    
  4. MaxV

    MaxV Member

    It works only using keyboard in the console to me...

Share This Page