a - b: Difference between revisions
Jump to navigation
Jump to search
m (Added note that the command creates a new array) |
m (Bot: Replacing category Scripting Commands Arma 3 with Arma 3: Scripting Commands) |
||
Line 38: | Line 38: | ||
<h3 style="display:none">Bottom Section</h3> | <h3 style="display:none">Bottom Section</h3> | ||
[[Category:Scripting Commands|#]] | [[Category:Scripting Commands|#]] | ||
Line 46: | Line 45: | ||
[[Category:Scripting Commands ArmA|#]] | [[Category:Scripting Commands ArmA|#]] | ||
[[Category:Scripting Commands ArmA2|#]] | [[Category:Scripting Commands ArmA2|#]] | ||
[[Category:Scripting Commands | [[Category:Arma 3: Scripting Commands]] | ||
[[Category: | [[Category:Command Group: Math|#]] | ||
[[Category: | [[Category:Command Group: Variables|#]] | ||
[[Category:Notes: Improper Formatting|{{uc:{{PAGENAME}}}}]] | [[Category:Notes: Improper Formatting|{{uc:{{PAGENAME}}}}]] |
Revision as of 16:11, 3 December 2018
Description
- Description:
- Subtracts b from a. a and b need to be of the same type, both Numbers or both Arrays. In Arma 3 it is possible to subtract nested arrays.
- Groups:
- Uncategorised
Syntax
Examples
- Example 1:
- For numbers:
_sum = 10 - 7; //_sum is 3
- Example 2:
- For arrays: contents of array b removed from array a. Returns new array.
_result = [1, 2, 2, player, "String"] - [2, player, player, "String"]; //_result is [1]
- Example 3:
- Compare:
[0,[0],[[0]]] - [0]; //[[0],[[0]]] [0,[0],[[0]]] - [[0]]; //[0,[[0]]] - Arma 3 only [0,[0],[[0]]] - [[[0]]]; //[0,[0]] - Arma 3 only
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
Bottom Section
Categories:
- Scripting Commands
- Introduced with Operation Flashpoint version 1.00
- Operation Flashpoint: New Scripting Commands
- Operation Flashpoint: Scripting Commands
- Command Group: Uncategorised
- Scripting Commands OFP 1.99
- Scripting Commands OFP 1.96
- Scripting Commands OFP 1.46
- Scripting Commands ArmA
- Scripting Commands ArmA2
- Arma 3: Scripting Commands
- Command Group: Math
- Command Group: Variables
- Notes: Improper Formatting