Mine is more of a <i>programming </i>problem, rather than one native to Pascal, but here goes:<br><br>I have a text file with many Double values. Looking more or less like below, but with hundreds of entries...<br><br>1.5<br>
3.25<br>7.54<br>10.33<br>2.22<br><br>The values listed are only for illustration. What I need to do is read the values in the first file and sum them up such that the output file starts with the first value, the second entry in the output file is the sum of the first AND second values, the third entry in the output file is the sum of the first, second and third values of the input file:<br>
<br>1.5<br>4.75 (1.5 + 3.25)<br>12.29 (1.5 + 3.25 + 7.54)<br>22.62 (1.5 + 3.25 + 7.54 + 10.33)<br>24.84 (1.5 + 3.25 + 7.54 + 10.33 + 2.22)<br><br>The process of summing up continues to the end of the file.<br>
<br>I figure this is a program loop problem, rather than a Pascal problem, but it's beyond me. I would greatly appreciate assistance.<br><br>Thank you,<br>Ko Hashiguchi<br><br>