Anonymous user
Text processing/2: Difference between revisions
no edit summary
(Some more typos) |
No edit summary |
||
Line 25:
=={{header|Ada}}==
{{libheader|Simple components for Ada}}
<lang ada>
with Ada.Calendar; use Ada.Calendar;
with Ada.Text_IO; use Ada.Text_IO;
Line 89:
Put_Line ("Valid records " & Image (Count) & " of " & Image (Line_No) & " total");
end Data_Munging_2;
</
Sample output
<pre>
Line 196:
=={{header|OCaml}}==
<lang ocaml>#load "str.cma"
open Str
Line 263:
Printf.printf "number of good records: %d\n" (num_good_records inputs);
;;</
this script outputs:
Line 277:
=={{header|Perl}}==
<lang perl>use List::MoreUtils 'natatime';
use constant FIELDS => 49;
Line 304:
map {" $_\n"}
grep {$dates{$_} > 1}
sort keys %dates;</
Output:
Line 375:
* Generate mostly summary information that is easier to compare to other solutions.
<lang python>import re
import zipfile
import StringIO
Line 420:
readings = open('readings.txt','r')
munge2(readings)
</
<pre>bash$ /cygdrive/c/Python26/python munge2.py
Duplicate dates:
|