Handbook
Glossary
string>longitude ( str -- lon/f )
Vocabulary
metar
.
private
Inputs
str
an
object
Outputs
lon/f
an
object
Definition
USING:
kernel
math
regexp
sequences
;
IN:
metar.private
:
string>longitude
( str -- lon/f )
dup
R/ \d+-\d+(-\d+(\.\d+)?)?[WE]/
matches?
[
unclip-last
[
parse-location
]
[
87
=
[
neg
]
when
]
bi*
]
[
drop
f
]
if
;