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

13 lines
277 B
Text
Raw Permalink Normal View History

2023-07-01 11:58:00 -04:00
in$ ="Not,Hardly,Just,Adequately,Quite,Really,Very,Fantastically,xyzzy"
element$ =""
i =1 ' used to point to successive elements
do
element$ =word$( in$, i, ",")
if element$ ="xyzzy" then exit do
print element$; " good!"
i =i +1
loop until 1 =2
end