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

Reverse append refinement for write

 [1/9] from: louisaturk::coxinet::net at: 14-Aug-2002 23:25


Hi rebols, How can I append a string to the beginning of a file instead of to its end? Louis

 [2/9] from: greggirwin:mindspring at: 14-Aug-2002 23:03


Hi Louis << How can I append a string to the beginning of a file instead of to its end? >> How about this? close insert open %test.txt reduce [now newline] --Gregg

 [3/9] from: louisaturk:coxinet at: 15-Aug-2002 1:06


Hi Greg, At 11:03 PM 8/14/2002 -0600, you wrote:
>Hi Louis > ><< How can I append a string to the beginning of a file instead of to its >end? >> > >How about this? > > close insert open %test.txt reduce [now newline] > >--Gregg
You alway help me. It works great! Many thanks. Louis

 [4/9] from: info:id-net:ch at: 15-Aug-2002 11:54


or watch out the %values.r of Andrew Martin for the PUSH function..

 [5/9] from: al:bri:xtra at: 15-Aug-2002 22:27


> or watch out the %values.r of Andrew Martin for the PUSH function..
Push: func [ "Inserts a value into a series and returns the series head." Stack [series! port! bitset!] "Series at point to insert." Value [any-type!] /Only "The value to insert." ][ head either Only [ insert/only Stack :Value ][ insert Stack :Value ] ] Andrew Martin The benefits of dialecting are many... ICQ: 26227169 http://valley.150m.com/

 [6/9] from: louisaturk:coxinet at: 15-Aug-2002 8:46


Thanks, Andrew! At 10:27 PM 8/15/2002 +1200, you wrote:

 [7/9] from: louisaturk:coxinet at: 15-Aug-2002 9:37


Hi again Andrew, At 10:27 PM 8/15/2002 +1200, you wrote:
> > or watch out the %values.r of Andrew Martin for the PUSH function.. >Push: func [
<<quoted lines omitted: 12>>
>ICQ: 26227169 http://valley.150m.com/ >-><-
Whoops! How do I use push?
>> Push: func [
[ "Inserts a value into a series and returns the series head." [ Stack [series! port! bitset!] "Series at point to insert." [ Value [any-type!] /Only "The value to insert." [ ][ [ head either Only [ [ insert/only Stack :Value [ ][ [ insert Stack :Value [ ] [ ]
>> >> push %pig.txt "Yet another line."
== %Yet another line.pig.txt
>> print read %pig.txt
What a day. 15-Aug-2002/0:59:11-5:00 A line of text.

 [8/9] from: al:bri:xtra at: 16-Aug-2002 16:25


Louis wrote:
> Whoops! How do I use push? >> write/lines %pig.txt x: push read/lines %pig.txt "Yet another line." >> x
== ["Yet another line." "What a day." "15-Aug-2002/0:59:11-5:00" "A line of text."] Andrew Martin Read and writing the documents of Rebolution... ICQ: 26227169 http://valley.150m.com/

 [9/9] from: louisaturk:coxinet at: 16-Aug-2002 0:17


Andrew, Many thanks! I'll study your code. I've learned much from you. Louis At 04:25 PM 8/16/2002 +1200, you wrote:

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