Handbook
Glossary
parse-cloud-cover ( str -- str' )
Vocabulary
metar
.
private
Inputs
str
an
object
Outputs
str'
an
object
Definition
USING:
arrays
assocs
formatting
kernel
math
sequences
splitting
;
IN:
metar.private
:
parse-cloud-cover
( str -- str' )
"8/"
?head
drop
first3
[
48
-
]
tri@
[
[
f
]
[
low-clouds
at
"low clouds are %s"
sprintf
]
if-zero
]
[
[
f
]
[
mid-clouds
at
"middle clouds are %s"
sprintf
]
if-zero
]
[
[
f
]
[
high-clouds
at
"high clouds are %s"
sprintf
]
if-zero
]
tri*
3array
join-words
;