This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 225
Expand file tree
/
Copy pathfor.lcdoc
More file actions
47 lines (33 loc) · 1.45 KB
/
for.lcdoc
File metadata and controls
47 lines (33 loc) · 1.45 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
46
47
Name: for
Type: keyword
Syntax: for
Summary:
Used in a <repeat> <control structure> to specify the number of times
the <loop> should repeat.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
repeat for 10 times
Example:
repeat for (the number of buttons)
Description:
Use the <for> <keyword> to specify a fixed number of
<iteration|iterations> of a <loop>.
The number may be a literal number, or an expression that evaluates to a
number. (If the number is not an integer, it is rounded to the nearest
integer.) Either way, the number is evaluated when the <repeat>
<control structure> is entered, and is not re-<evaluate|evaluated> as a
result of <statement|statements> in the <loop>. For example, if the
<repeat> <control structure> begins with the line
repeat for the number of cards
then this number is evaluated as of the start of the loop, and the
number does not change even if the statements in the loop create or
delete cards. For this reason, use caution when using the <for>
<keyword> with an <expression> : do not assume the <expression> will
have its current <value> when the <statement|statements> inside the
<loop> are <execute|executing>.
References: repeat (control structure), value (function), loop (glossary),
iteration (glossary), execute (glossary), statement (glossary),
keyword (glossary), control structure (glossary), evaluate (glossary),
expression (glossary), until (keyword), while (keyword)