Loop structures: Difference between revisions

Line 58:
'''NOT COVERED IN LOOP PAGES'''
===repeat-until===
<syntaxhighlight lang="applescript>
set i to 5
repeat until i is less than 0
repeat setuntil i tois iless -than 10
set arrayi to {i - 1,2,3,4,5}
end repeat
 
repeat
--endless loop
end repeat
</syntaxhighlight>
 
===repeat-with===
<syntaxhighlight lang="applescript>
repeat with i from 1 to 20
--do something
end--do repeatsomething
end repeat
 
set array to {1,2,3,4,5}
repeat with i in array
display dialog i
end repeat
 
set array to {1,2,3,4,5}
repeat with i in array
display dialog i
end repeat
</syntaxhighlight>
 
==[[AssemblyScript]]==