forked from livecode/livecode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathnext-repeat.lcdoc
More file actions
46 lines (32 loc) · 1.33 KB
/
Copy pathnext-repeat.lcdoc
File metadata and controls
46 lines (32 loc) · 1.33 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
Name: next repeat
Type: control structure
Syntax: next repeat
Summary:
Skips the rest of the current <iteration> and goes back to the top of
the <repeat> <control structure|structure>.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Description:
Use the <next repeat> <control structure> to skip part of a <repeat>
loop.
**Form:** The <next repeat> <statement> appears on a line by itself,
anywhere inside a <repeat> <control structure>.
The <next repeat> <control structure> skips the rest of the current
<iteration>, and continues to the next <iteration>. The following
example performs the loop action only if the <folder|folder's> name
does not begin with the character ".":
local tFolders
repeat for each line tFolder in folders(tPath)
if tFolder begins with "." then
next repeat
end if
put tPath & slash & tFolder & return after tFolders
end repeat
Usually, <next repeat> is used within an <if> <control structure>, so
that the current <iteration> is skipped if a condition is true and
continues if the condition is false.
References: if (control structure), exit repeat (control structure),
repeat (control structure), current card (glossary), iteration (glossary),
statement (glossary), control structure (glossary), end repeat (keyword),
next (keyword)