while: Difference between revisions
Jump to navigation
Jump to search
m (Added a cross link) |
m (argument is code, not string) |
||
Line 12: | Line 12: | ||
| '''while''' condition |= Syntax | | '''while''' condition |= Syntax | ||
|p1= condition: [[ | |p1= condition: [[Code]] |= Parameter 1 | ||
| [[While Type]] |= Return value | | [[While Type]] |= Return value |
Revision as of 14:53, 19 October 2006
Description
- Description:
- First part of while construct.
- Groups:
- Uncategorised
Syntax
- Syntax:
- while condition
- Parameters:
- condition: Code
- Return Value:
- While Type
Examples
- Example 1:
while {x<10} do {x=x+1}
- Example 2:
- A more practical example: To repair all the members of a group to such a level that they are all able to stand up:
{while {(not canStand _x) and alive _x)} do {_x setDammage (getDammage _x) - 0.01}}forEach units group unitname
Additional Information
- See also:
- See also needed
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