BIS fnc areEqualNotNil: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " <h3 style="display:none">Notes</h3> <dl class="command_description"> <!-- Note Section BEGIN --> <!-- Note Section END --> </dl>" to "") |
Lou Montana (talk | contribs) m (Text replacement - " *\| *([Cc]omments|COMMENTS|[Gg]ame [Nn]ame|Game [Vv]ersion|Game Version \(number surrounded by NO SPACES\)|Multiplayer Arguments \("local" or "global"\)|Multiplayer Effects \("local" or "global"\)|Multiplayer Execution \("server" o...) |
||
Line 1: | Line 1: | ||
{{Function | {{Function | ||
| arma3 | | arma3 | ||
|1.00 | |1.00 | ||
|gr1 = Variables | |gr1 = Variables | ||
| Compares all elements of passed array between each other and returns true is all are defined and identical.<br> | | Compares all elements of passed array between each other and returns true is all are defined and identical.<br> | ||
Very fast, different from [[BIS_fnc_areEqual]] in that [[nil]] values will not be considered equal to each other. | Very fast, different from [[BIS_fnc_areEqual]] in that [[nil]] values will not be considered equal to each other. | ||
| [anything1, anything2, …] call [[BIS_fnc_areEqualNotNil]] | | [anything1, anything2, …] call [[BIS_fnc_areEqualNotNil]] | ||
|p1= anythings: [[Anything]] - [[nil]] values won't be considered equal | |p1= anythings: [[Anything]] - [[nil]] values won't be considered equal | ||
| [[Boolean]] | | [[Boolean]] | ||
|x1= <code><nowiki>[</nowiki>[1, 2, [3, [4, 5]]], [1, 2, [3, [4, 5]]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// true}} | |x1= <code><nowiki>[</nowiki>[1, 2, [3, [4, 5]]], [1, 2, [3, [4, 5]]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// true}} | ||
<nowiki>[</nowiki>[1, 2, [3, [4, [[nil]]]]], [1, 2, [3, [4, [[nil]]]]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// false}}</code> | <nowiki>[</nowiki>[1, 2, [3, [4, [[nil]]]]], [1, 2, [3, [4, [[nil]]]]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// false}}</code> | ||
|x2= <code><nowiki>[</nowiki>[[nil]], [[nil]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// false}}</code> | |x2= <code><nowiki>[</nowiki>[[nil]], [[nil]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// false}}</code> | ||
| [[isEqualTo]], [[BIS_fnc_areEqual]] | | [[isEqualTo]], [[BIS_fnc_areEqual]] | ||
}} | }} |
Revision as of 22:37, 17 January 2021
Description
- Description:
- Compares all elements of passed array between each other and returns true is all are defined and identical.
Very fast, different from BIS_fnc_areEqual in that nil values will not be considered equal to each other. - Execution:
- call
- Groups:
- Variables
Syntax
- Syntax:
- [anything1, anything2, …] call BIS_fnc_areEqualNotNil
- Parameters:
- anythings: Anything - nil values won't be considered equal
- Return Value:
- Boolean
Examples
- Example 1:
[[1, 2, [3, [4, 5]]], [1, 2, [3, [4, 5]]]] call BIS_fnc_areEqualNotNil; // true [[1, 2, [3, [4, nil]]], [1, 2, [3, [4, nil]]]] call BIS_fnc_areEqualNotNil; // false
- Example 2:
[nil, nil] call BIS_fnc_areEqualNotNil; // false
Additional Information
- See also:
- isEqualToBIS_fnc_areEqual
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