Anonymous user
Text processing/1: Difference between revisions
Updated to work with Nim 1.4: replaced [1..-1]" with "[1..^1]. Changed output formatting to use the more friendly "strformat". Done miscellaneous other changes.
m (→{{header|Phix}}: no_empty now defaults to true) |
(Updated to work with Nim 1.4: replaced [1..-1]" with "[1..^1]. Changed output formatting to use the more friendly "strformat". Done miscellaneous other changes.) |
||
Line 2,496:
echo "Maximum run(s) of ", nodataMax, " consecutive false readings ends at line starting with date(s): ", nodataMaxLine.join(" ")</lang>
Output:
<pre>$ ./textproc1 readings.txt | tail
Line: 2004-12-29 Reject: 1 Accept: 23 LineTot: 56.
Line: 2004-12-30 Reject: 1 Accept: 23 LineTot: 65.
Line: 2004-12-31 Reject: 1 Accept: 23 LineTot: 47.
File(s) = readings.txt
Total =
Readings = 129403
Average = 10.
Maximum run(s) of 589 consecutive false readings ends at line starting with date(s): 1993-03-05.</pre>
=={{header|OCaml}}==
|