a - b: Difference between revisions
Jump to navigation
Jump to search
mNo edit summary |
mNo edit summary |
||
Line 10: | Line 10: | ||
____________________________________________________________________________________________ | ____________________________________________________________________________________________ | ||
| ''' ' | | a '''-''' b |= Syntax | ||
Revision as of 21:00, 21 January 2009
Description
- Description:
- For numbers: a minus b.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
Number
Result: _sum is 3
_sum = 10 - 7- Example 2:
For arrays: Contents of array b removed from array a.
_result is [1]
Array
_result = [1,2,2,player,"String"] - [2,player,player,"String"]
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
Notes
-
Note that this way of removing elements from an array will not work if those elements are themselves arrays.
Example:
[[0,0,0],[1,1,1],[2,2,2] ] - [1,1,1]
Will not remove the element [1,1,1] from the first array.
A more practical example:
[ getPos unit1, getPos unit2, getPos unit3] - getPos unit3
Will not remove the position of unit3 from the first array.