From Bohemia Interactive Community
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.
- Posted on January 29, 2016 - 05:18 (UTC)
- DreadedEntity
-
For loops can be safely nested. This means that there should not be any problems with recursion.
_array = [];
for "_i" from 0 to 3 do
{
for "_i" from 0 to 3 do
{
_array pushBack _i;
};
_array pushBack _i;
};
hint str _array;