CSV data manipulation: Difference between revisions
CSV data manipulation en QBasic
(CSV data manipulation en Yabasic) |
(CSV data manipulation en QBasic) |
||
Line 396:
4,8,12,16,50,90
</pre>
=={{header|BASIC}}==
{{works with|QBasic|1.1}}
{{works with|QuickBasic|4.5}}
{{trans|FreeBASIC}}
<lang qbasic>OPEN "manip.csv" FOR INPUT AS #1
OPEN "manip2.csv" FOR OUTPUT AS #2
LINE INPUT #1, header$
PRINT #2, header$ + ",SUM"
WHILE NOT EOF(1)
INPUT #1, c1, c2, c3, c4, c5
sum = c1 + c2 + c3 + c4 + c5
WRITE #2, c1, c2, c3, c4, c5, sum
WEND
CLOSE #1, #2
END</lang>
{{out}}
<pre>
Igual que la entrada de FreeBASIC.
</pre>
=={{header|C}}==
|