20 lines
394 B
Plaintext
20 lines
394 B
Plaintext
to csv.data.manipulation :in :out
|
|
local [header line list sum]
|
|
openread :in
|
|
setread :in
|
|
openwrite :out
|
|
setwrite :out
|
|
make "header readword
|
|
print word :header ",SUM
|
|
while [not eofp] [
|
|
make "line readword
|
|
make "list parse map [ifelse equalp ? ", ["\ ] [?]] :line
|
|
make "sum apply "sum :list
|
|
print (word :line "\, :sum)
|
|
]
|
|
close :in
|
|
setread []
|
|
close :out
|
|
setwrite []
|
|
end
|