Error getting tags :
error 404Error getting tags :
error 404 for | revDocs | RunRev
Welcome Guest (Log in)
Product Edition
Version
for
Basics
Expander triangle
Type
Keyword
Syntax
Introduced
1.0
Environment
Desktop, Web and Server
Platform Support
MacOS,Mac OS X,Windows,Linux
Security
None required
Summary
Used in a repeat control structure to specify the number of times the loop should repeat.
Examples

repeat for 10 times
repeat for (the number of buttons)

Additional Comments
Expander triangle

Use the for keyword to specify a fixed number of iterations of a loop.

Comments:

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-evaluated as a result of 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 statements inside the loop are executing.

User Comments
Expander triangle