for var: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
No edit summary
Line 9: Line 9:
|Starts '''for''' sequence, use in complete form (see example).
|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.
The default step increment is 1. An optional step increment can be specified using the extended syntax.
|= Description
{{warning | Broken}} |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


Line 42: Line 42:
[[Category:Scripting Commands ArmA|FORB]]
[[Category:Scripting Commands ArmA|FORB]]
[[Category:Command Group: Program Flow|FORB]]
[[Category:Command Group: Program Flow|FORB]]
[[Category:Broken Scripting Commands|{{uc:{{PAGENAME}}}}]]


<!-- CONTINUE Notes -->
<!-- CONTINUE Notes -->

Revision as of 15:44, 10 June 2015

-wrong parameter ("Arma") defined!-1.00
Hover & click on the images for description

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.
Broken
Groups:
Uncategorised

Syntax

Syntax:
for variable
Parameters:
variable: String
Return Value:
For Type

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

Posted on 29 April 2010 (CEST)
alef
for "_i" from 0 to 0 do {}; //will do once, with _i = 0 for "_i" from 0 to -1 do {}; //will not do

Bottom Section

Posted on June 4, 2015 - 19:27 (UTC)
Killzone Kid
Variable name doesn't have to start with _. could be:for "LAlala" from 0 to 0 do {hint str LAlala}; //0 The variable LAlala will exist only inside do {} scope and will not overwrite any variable of the same name that existed before.