RosettaCodeData/Task/Search-a-list/Forth/search-a-list-1.fth
2015-11-18 06:14:39 +00:00

11 lines
302 B
Forth

include lib/row.4th
create haystack
," Zig" ," Zag" ," Wally" ," Ronald" ," Bush" ," Krusty" ," Charlie"
," Bush" ," Boz" ," Zag" NULL ,
does>
dup >r 1 string-key row 2>r type 2r> ." is "
if r> - ." at " . else r> drop drop ." not found" then cr
;
s" Washington" haystack s" Bush" haystack