for var: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
Dr Eyeball (talk | contribs) (add Step syntax) |
||
Line 7: | Line 7: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
|Starts '''for''' sequence, use in complete form (see example). |= Description | |Starts '''for''' sequence, use in complete form (see example). | ||
The default step increment is 1. An optional step increment can be specified using the extended syntax. | |||
|= Description | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
Line 18: | Line 20: | ||
|x1= <code>'''for''' "_i" from 1 to 10 [[do]] {[[debugLog]] _i;}</code> |= Example 1 | |x1= <code>'''for''' "_i" from 1 to 10 [[do]] {[[debugLog]] _i;}</code> |= Example 1 | ||
|x2= <code>'''for''' "_i" from 9 to 1 step -2 [[do]] {[[debugLog]] _i;}</code> |= Example 2 | |||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| [[for forspec|for [ ]]], [[Control Structures]] |= See also | | [[for forspec|for [ ]]], [[for_do|for do]], [[Control Structures]] |= See also | ||
}} | }} |
Revision as of 08:53, 11 May 2009
Description
- Description:
- Starts for sequence, use in complete form (see example). The default step increment is 1. An optional step increment can be specified using the extended syntax.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
for "_i" from 1 to 10 do {debugLog _i;}
- Example 2:
for "_i" from 9 to 1 step -2 do {debugLog _i;}
Additional Information
- See also:
- for [ ]for doControl Structures
Notes
-
Report bugs on the Feedback Tracker and/or discuss them on the Arma Discord or on the Forums.
Only post proven facts here! Add Note
Notes
-
Chosen variable may not contain capital letters.
for "_I" from 0 to 4 do{}; //will not work
--T_D 23:46, 26 January 2007 (CET)