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

[REBOL] Compose words to get content

From: tmoeller:fastmail:fm at: 5-Sep-2005 9:49

Hi, i made a small script to split a file. I use a series containing the rules how every row in the source should be splitted. The problem i have is when i want to compose the new lines from the rules. A little example should make it more clear: sourcefile: read/lines %/c/temp/sourcefile.txt tpath: %/c/temp/ map: [ ["filename1.txt" "1" "8" "q"] ["filename2.txt" "1" "11" "m"] ["filename3.txt" "1" "27" "m"] ["filename4.txt" "1" "17" "q"] ] foreach line sourcefile[ cells: parse/all line "," foreach mline map [ write/append join tpath mline/1 reduce [join "cells/" mline/2 join " cells/" mline/3 " " mline/4 " " newline ]]; -- Problem ] The problem i could not get rid off, is that i get an error saying cells/1 has no value . It is composed correctly but cannot be evaluated. So, why can the content of cells not be acessed. I tried every combination coming to my mind, but nothing worked. Please help! Thanks Thorsten -- http://www.fastmail.fm - Send your email first class