RosettaCodeData/Task/Loops-Foreach/BASIC/loops-foreach-10.basic

13 lines
277 B
Text
Raw Permalink Normal View History

2019-09-12 10:33:56 -07:00
in$ ="Not,Hardly,Just,Adequately,Quite,Really,Very,Fantastically,xyzzy"
element$ =""
i =1 ' used to point to successive elements
2013-04-10 22:43:41 -07:00
2019-09-12 10:33:56 -07:00
do
element$ =word$( in$, i, ",")
if element$ ="xyzzy" then exit do
print element$; " good!"
i =i +1
loop until 1 =2
end