-: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Text replacement - "\{\{ *codecomment *\| *\/\/ *([^ ]+) *\}\} " to "{{cc|$1}}")
Line 35: Line 35:


|x2= <code>_numA = 4;
|x2= <code>_numA = 4;
_numB = -_numA; {{codecomment|// result is -4}}
_numB = -_numA; {{cc| result is -4}}_numB = -_numB; {{codecomment|// result is  4}}</code>  
_numB = -_numB; {{codecomment|// result is  4}}</code>  


|x3= <code>_result = [1, 2, 2, [[player]], "String"] - [2, [[player]], [[player]], "String"]; {{codecomment|// _result is [1]}}</code>  
|x3= <code>_result = [1, 2, 2, [[player]], "String"] - [2, [[player]], [[player]], "String"]; {{codecomment|// _result is [1]}}</code>  
Line 42: Line 41:
|x4= <code>_result = [0, [0], [<nowiki/>[0]]] - [0]; {{codecomment|// [<nowiki/>[0],<nowiki>[</nowiki>[0]]]}}</code>  
|x4= <code>_result = [0, [0], [<nowiki/>[0]]] - [0]; {{codecomment|// [<nowiki/>[0],<nowiki>[</nowiki>[0]]]}}</code>  


|x5= <code>_result = [0, [0], [<nowiki/>[0]]] - [<nowiki/>[0]]; {{codecomment|// [0,<nowiki>[</nowiki>[0]]] - Since {{arma3}}}}
|x5= <code>_result = [0, [0], [<nowiki/>[0]]] - [<nowiki/>[0]]; {{cc| [0,<nowiki>[</nowiki>[0]]] - Since {{arma3}}}}_result = [0, [0], [<nowiki/>[0]]] - [<nowiki/><nowiki>[</nowiki>[0]]]; {{codecomment|// [0,[0]] - Since {{arma3}}}}</code>  
_result = [0, [0], [<nowiki/>[0]]] - [<nowiki/><nowiki>[</nowiki>[0]]]; {{codecomment|// [0,[0]] - Since {{arma3}}}}</code>  


| [[Array]], [[Operators]], [[deleteAt]], [[deleteRange]]  
| [[Array]], [[Operators]], [[deleteAt]], [[deleteRange]]  

Revision as of 17:31, 29 January 2021

Hover & click on the images for description

Description

Description:
Description needed
Groups:
Math

Syntax 1

Syntax:
Syntax needed
Parameters:
numberA: Number
numberB: Number
Return Value:
Return value needed

Syntax 2

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

Syntax 3

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

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