-

From Bohemia Interactive Community
Jump to navigation Jump to search
Introduced with Operation Flashpoint version 1.00
  

Click on the images for descriptions

Introduced in

Game:
Operation Flashpoint
Version:
1.00

Description

Description:
Subtracts an element from another.
Arma 3 logo black.png
In Arma 3 it is possible to subtract nested arrays.

Syntax

Syntax:
numberA - numberB
Parameters:
numberA: Number
numberB: Number
Return Value:
Number

Alternative Syntax

Syntax:
- numberA
Parameters:
numberA: Number
Return Value:
Number - the negative of numberA

Alternative Syntax 2

Syntax:
arrayA - arrayB
Parameters:
arrayA: Array
arrayB: Array
Return Value:
Array

Examples

Example 1:
_result = 10 - 7; // result is 3
Example 2:
_numA = 4; _numB = -_numA; // result is -4 _numB = -_numB; // result is 4
Example 3:
_result = [1, 2, 2, player, "String"] - [2, player, player, "String"]; // _result is [1]
Example 4:
_result = [0, [0], [[0]]] - [0]; // [[0],[[0]]]
Example 5:
_result = [0, [0], [[0]]] - [[0]]; // [0,[[0]]] - Since Arma 3 _result = [0, [0], [[0]]] - [[[0]]]; // [0,[0]] - Since Arma 3

Additional Information

Multiplayer:
-
See also:
ArrayOperators

Notes

Only post proven facts here. Report bugs on the feedback tracker. Use the talk page or the forums for discussions.
Add New Note | How To

Notes

Bottom Section