Jump to content

Talk:Text processing/1: Difference between revisions

Line 48:
flag<=0)</pre>
::Is where it is saying it wants the longest gap, not restricting it to a single record(line), as the sentence above it in the article is. --[[User:Paddy3118|Paddy3118]] 18:55, 11 November 2008 (UTC)
:::That sentence does not say whether they want the longest gap in a line or over multiple lines. However, the code included in the original message
 
for (i=1;i<=24;i++)
if ($(i*2+1)>0){
num_valid++
sum+=$(i*2)
} else {
# find out what the max_gap for this row is
}
if (num_valid>13 && max_gap<=6){
print date,sum/num_valid,1
} else {
# print something else
}
 
:::indicates that max gap for each row is required. In addition, if the gap is longer than 6, the average for the line would not be displayed. But if the data is from some measurement device such as weather station, it makes sense to find out the longest overall gap period. Anyway, from Rosetta Code point of view, this is insignificant. --[[User:PauliKL|PauliKL]] 13:06, 12 November 2008 (UTC)
Anonymous user
Cookies help us deliver our services. By using our services, you agree to our use of cookies.