BIS fnc areEqualNotNil: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - " {{Function|Comments=" to "{{Function|Comments=")
m (Some wiki formatting)
 
(15 intermediate revisions by 2 users not shown)
Line 1: Line 1:
{{Function|Comments=
{{RV|type=function
____________________________________________________________________________________________


| arma3 |Game name=
|game1= arma3
|version1= 1.00


|1.00|Game version=
|gr1= Variables
____________________________________________________________________________________________


| Compares all elements of passed array between each other and returns true is all are defined and identical.<br />
|descr= 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. |DESCRIPTION=
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]] |SYNTAX=
|s1= [anything1, anything2, …] call [[BIS_fnc_areEqualNotNil]]
|p1= anythings: [[Anything]] - [[nil]] values won't be considered equal |PARAMETER1=


| [[Boolean]] |RETURNVALUE=
|p1= anythings: [[Anything]] - [[nil]] values won't be considered equal
____________________________________________________________________________________________


|x1= <code><nowiki>[</nowiki>[1, 2, [3, [4, 5]]],  [1, 2, [3, [4, 5]]]]  [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// true}}
|r1= [[Boolean]]
<nowiki>[</nowiki>[1, 2, [3, [4, [[nil]]]]], [1, 2, [3, [4, [[nil]]]]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// false}}</code> |EXAMPLE1=


|x2= <code><nowiki>[</nowiki>[[nil]], [[nil]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// false}}</code> |EXAMPLE2=
|x1= <sqf>
____________________________________________________________________________________________
[[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
</sqf>


| [[isEqualTo]], [[BIS_fnc_areEqual]] |SEEALSO=
|x2= <sqf>[nil, nil] call BIS_fnc_areEqualNotNil; // false</sqf>


|seealso= [[isEqualTo]] [[BIS_fnc_areEqual]]
}}
}}
<h3 style="display:none">Notes</h3>
<dl class="command_description">
<!-- Note Section BEGIN -->
<!-- Note Section END -->
</dl>
<h3 style="display:none">Bottom Section</h3>
[[Category:Function Group: Variables|{{uc:areEqualNotNil}}]]
[[Category:Functions|{{uc:areEqualNotNil}}]]
[[Category:{{Name|arma3}}: Functions|{{uc:areEqualNotNil}}]]

Latest revision as of 16:31, 13 July 2022

Hover & click on the images for description

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:
isEqualTo BIS_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