Brightscript is more similar to BASIC, where For is always followed by a Next:
for i=0 to 100
print i
next i
for each element in array
?element
next
(notice, you don't reference the variable name in a
for each)However Next is deprecated in favor of End For
for i=0 to 100
print i
end for
for each element in array
print element
end for
There is no continue. There is a goto statement which can jump to labeled code:
sub main()
for i=0 to 100
if i=50 then
goto somewhere
end if
end for
somewhere:
print "i=";i
end sub
Generally, using goto statements is not recommended.
- Joel