Text processing/2: Difference between revisions

m
ce lead paragraphs
m (ce lead paragraphs)
Line 2:
The following data shows a few lines from the file readings.txt (as used in the [[Data Munging]] task).
 
The data comes from a pollution monitoring station with twenty four instruments monitoring twenty -four aspects of pollution in the air. Periodically a record is added to the file, each record constitutingbeing a line of 49 white-space separated fields, where white-space can be one or more space or tab characters.
 
The fields (from the left) are:
DATESTAMP [ VALUEn FLAGn ] * 24
i.e. a datestamp followed by twenty four repetitions of a floating -point instrument value and that instrumentsinstrument's associated integer flag. Flag values are >= 1 if the instrument is working and < 1 if there is some problem with that instrument, in which case that instrument's value should be ignored.
A sample from the full data file [http://rosettacode.org/resources/readings.zip readings.txt] is:
Line 19:
 
The task:
# Confirm the general field format of the file.
# Identify any DATESTAMPs that are duplicated.
# WhatReport the number of records have good readings for all instruments.
 
=={{header|Ada}}==
2,446

edits