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.330 LineAvg: 2.4478345
Line: 2004-12-30 Reject: 1 Accept: 23 LineTot: 65.330 LineAvg: 2.8391384
Line: 2004-12-31 Reject: 1 Accept: 23 LineTot: 47.330 LineAvg: 2.0565206
 
File(s) = readings.txt
Total = 11358393.35839e+0640
Readings = 129403
Average = 10.497450
 
Maximum run(s) of 589 consecutive false readings ends at line starting with date(s): 1993-03-05.</pre>
 
=={{header|OCaml}}==
Anonymous user