for var: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(Redirect to for)
 
(16 intermediate revisions by 6 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 -->
Chosen variable may not contain capital letters.
for "_I" from 0 to 4 do{}; //will not work
--[[User:T D|T_D]] 23:46, 26 January 2007 (CET)
 
for "_i" from 0 to 0  do{}; //will do once, with _i=0
for "_i" from 0 to -1 do{}; //will not do
[[User:Alef|alef]] 16:06, 29 April 2010 (CEST)
<!-- 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]]
[[Category:Scripting Commands VBS2|{{uc:{{PAGENAME}}}}]]

Latest revision as of 22:15, 4 February 2019

Redirect to: