parse-1hr-temp ( str -- str' )


Vocabulary
metar.private

Inputs
stran object


Outputs
str'an object


Definition


: parse-1hr-temp ( str -- str' )
"T" ?head drop dup length 4 > [
double-value [ dup C>F "%.1f °C (%.1f °F)" sprintf ] bi@
"hourly temperature %s and dew point %s" sprintf
] [
single-value dup C>F
"hourly temperature %.1f °C (%.1f °F)" sprintf
] if ;