parse-rvr ( str -- str' )


Vocabulary
metar.private

Inputs
stran object


Outputs
str'an object


Definition


: parse-rvr ( str -- str' )
{
{ [ "U" ?tail ] [ " with improvement" ] }
{ [ "D" ?tail ] [ " with aggravation" ] }
{ [ "N" ?tail ] [ " with no change" ] }
[ "" ]
} cond [
"R" ?head drop "/" split1 "FT" ?tail [
"V" split1 [
[ string>number ] bi@
"varying between %s and %s" sprintf
] [ string>number "of %s" sprintf ] if*
"runway %s visibility %s" sprintf
] dip " ft" " meters" ? append
] dip append ;