for var: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
(Redirect to for)
 
(12 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Command|= Comments
#REDIRECT [[for]]
____________________________________________________________________________________________
 
| arma |= Game name
 
|1.00|= Game version
____________________________________________________________________________________________
 
|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
____________________________________________________________________________________________
 
| '''for''' variable |= Syntax
 
|p1= variable: [[String]] (must be all '''lowercase''') |= Parameter 1
 
| [[For Type]] |= Return value
____________________________________________________________________________________________
 
|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 [ ]]], [[for_do|for do]], [[Control Structures]] |= See also
 
}}
 
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<dd class="notedate">Posted on 26 January 2007 (CET)
<dt class="note">'''[[User:T D|T_D]]'''
<dd class="note">Chosen variable may not contain capital letters.
<code>[[for]] "_I" [[from]] 0 [[to]] 4 [[do]] {}; //will not work</code>
 
<dd class="notedate">Posted on 4 October 2011 (CET)
<dt class="note">'''[[User:Kju|kju]]'''
<dd class="note">Chosen variable may contain capital letters since OA 1.60. ([http://dev-heaven.net/issues/8354 Ref]){{GVI|arma 2 oa|1.60}}
 
<dd class="notedate">Posted on 29 April 2010 (CEST)
<dt class="note">'''[[User:Alef|alef]]'''<dd class="note"><code>
[[for]] "_i" [[from]] 0 [[to]] 0 [[do]] {}; //will do once, with _i = 0
[[for]] "_i" [[from]] 0 [[to]] -1 [[do]] {}; //will not do
</code>
<!-- Note Section END -->
</dl>
 
<h3 style="display:none">Bottom Section</h3>
[[Category:Scripting Commands|FORB]]
[[Category:Scripting Commands ArmA|FORB]]
[[Category:Command Group: Program Flow|FORB]]

Latest revision as of 21:15, 4 February 2019

Redirect to: