step: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "<h3 style="display:none">Bottom Section</h3> " to "")
m (Text replacement - " *\| *([Cc]omments|COMMENTS|Game|[Gg]ame [Nn]ame( +[0-9])?|Game [Vv]ersion( +[0-9])?|Game Version \(number surrounded by NO SPACES\)|Arguments in MP|MP[Aa]rg|Multiplayer Arguments( \("local" or "global"\))?|Effects|Execution|Effects...)
Line 1: Line 1:
{{Command|Comments=
{{Command


| arma1 |Game name=
| arma1


|gr1= Program Flow |GROUP1=
|gr1= Program Flow






|1.00|Game version=
|1.00


| Optionally can set step. If you want to count down, step must be specified, and set negative. Default value is 1. |DESCRIPTION=
| Optionally can set step. If you want to count down, step must be specified, and set negative. Default value is 1.


| for '''step''' stepSize |SYNTAX=
| for '''step''' stepSize


|p1= for: [[For Type]] |PARAMETER1=
|p1= for: [[For Type]]


|p2= stepSize: [[Number]] |PARAMETER2=
|p2= stepSize: [[Number]]


| [[For Type]] |RETURNVALUE=
| [[For Type]]
   
   
|x1= <pre>for "_x" from 20 to 10 step -2 do {..code..}</pre> |EXAMPLE1=
|x1= <pre>for "_x" from 20 to 10 step -2 do {..code..}</pre>


| [[Control Structures]] |SEEALSO=
| [[Control Structures]]


}}
}}

Revision as of 11:24, 18 January 2021

Hover & click on the images for description

Description

Description:
Optionally can set step. If you want to count down, step must be specified, and set negative. Default value is 1.
Groups:
Program Flow

Syntax

Syntax:
for step stepSize
Parameters:
for: For Type
stepSize: Number
Return Value:
For Type

Examples

Example 1:
for "_x" from 20 to 10 step -2 do {..code..}

Additional Information

See also:
Control 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