Text processing/1: Difference between revisions

→‎{{header|Kotlin}}: Re-ran program following recovery and mirroring of full data file.
(Add mirror of data file. (Link is 404))
(→‎{{header|Kotlin}}: Re-ran program following recovery and mirroring of full data file.)
Line 2,201:
 
=={{header|Kotlin}}==
<lang scala>// version 1.2.031
As the link to the full data file is now broken, I've had to confine myself to the 6 lines shown in the task description for testing purposes.
<lang scala>// version 1.2.0
 
import java.io.File
Line 2,255 ⟶ 2,254:
 
{{out}}
Abbreviated output:
<pre>
Line: 19911990-0301-3001 Reject: 02 Accept: 2422 Line_tot: 240590.000 Line_avg: 1026.000818
Line: 19911990-0301-3102 Reject: 0 Accept: 24 Line_tot: 565410.000 Line_avg: 2317.542083
Line: 19911990-0301-3103 Reject: 23 0 Accept: 124 Line_tot: 401415.000 Line_avg: 4058.000958
Line: 1991-041990-01-04 Reject: 10 Accept: 2324 Line_tot: 5341800.000 Line_avg: 2375.217000
Line: 19911990-0401-0205 Reject: 0 Accept: 24 Line_tot: 4751130.000 Line_avg: 1947.792083
....
Line: 19912004-0412-0327 Reject: 01 Accept: 2423 Line_tot: 335 57.000100 Line_avg: 13 2.958483
Line: 2004-12-28 Reject: 1 Accept: 23 Line_tot: 77.800 Line_avg: 3.383
Line: 2004-12-29 Reject: 1 Accept: 23 Line_tot: 56.300 Line_avg: 2.448
Line: 2004-12-30 Reject: 1 Accept: 23 Line_tot: 65.300 Line_avg: 2.839
Line: 2004-12-31 Reject: 1 Accept: 23 Line_tot: 47.300 Line_avg: 2.057
 
File = readings.txt
Total = 21891358393.000400
Readings = 120129403
Average = 1810.242497
 
Maximum run of 24589 consecutive false readings
ends at line starting with date: 19911993-0403-0105
</pre>
 
9,486

edits