Handbook
Glossary
parse-rvr ( str -- str' )
Vocabulary
metar
.
private
Inputs
str
an
object
Outputs
str'
an
object
Definition
USING:
combinators
formatting
kernel
math.parser
sequences
splitting
;
IN:
metar.private
:
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
;