for var: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(can contain lower case, the notes about it moved to talk)
(Redirect to for)
 
(11 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]]|= 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 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 22:15, 4 February 2019

Redirect to: