RosettaCodeData/Task/Middle-three-digits/Forth/middle-three-digits.fth
2014-01-17 05:34:36 +00:00

4 lines
122 B
Forth

: middle3 ( n1 -- a n2)
abs s>d <# #s #> dup 2/ 0<> over 1 and 0<> and
if 2/ 1- chars + 3 else drop 0 then
;