continueWith: Difference between revisions
Jump to navigation
Jump to search
(Added example) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(One intermediate revision by the same user not shown) | |||
Line 2: | Line 2: | ||
|game1= arma3 | |game1= arma3 | ||
|version1= 2.02 | |version1= 2.02 | ||
Line 11: | Line 10: | ||
|s1= [[continueWith]] return | |s1= [[continueWith]] return | ||
|p1= return: [[Anything]] - | |p1= return: [[Anything]] - value to be returned when iteration is skipped | ||
|r1= [[Anything]] | |r1= [[Anything]] | ||
|x1= | |x1= <sqf> | ||
// results in [2, "TEST", 4] | |||
private _result = [1, 2, 3] apply { | |||
if (_x == 2) then { | |||
} | continueWith "TEST"; | ||
_x + 1 | } else { | ||
_x + 1; | |||
}; | }; | ||
};</ | }; | ||
</sqf> | |||
|seealso= [[continue]] [[break]] [[breakWith]] | |seealso= [[continue]] [[break]] [[breakWith]] | ||
}} | }} |
Latest revision as of 16:27, 4 May 2022
Description
- Description:
- Skips the current loop iteration, continues with the next one and returns the given value.
- Groups:
- Program Flow
Syntax
- Syntax:
- continueWith return
- Parameters:
- return: Anything - value to be returned when iteration is skipped
- Return Value:
- Anything
Examples
- Example 1:
Additional Information
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