BIS fnc areEqualNotNil: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\[\[Category\:Function Group\: Variables(\|\{\{[a-zA-Z0-9_:]+\}\})?\]\]" to "")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Function|Comments=
{{Function|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 7: Line 6:


|gr1 = Variables |GROUP1=
|gr1 = Variables |GROUP1=
____________________________________________________________________________________________


| 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. |DESCRIPTION=
Very fast, different from [[BIS_fnc_areEqual]] in that [[nil]] values will not be considered equal to each other. |DESCRIPTION=
____________________________________________________________________________________________


| [anything1, anything2, …] call [[BIS_fnc_areEqualNotNil]] |SYNTAX=
| [anything1, anything2, …] call [[BIS_fnc_areEqualNotNil]] |SYNTAX=
Line 17: Line 14:


| [[Boolean]] |RETURNVALUE=
| [[Boolean]] |RETURNVALUE=
____________________________________________________________________________________________


|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}}
Line 23: Line 19:


|x2= <code><nowiki>[</nowiki>[[nil]], [[nil]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// false}}</code> |EXAMPLE2=
|x2= <code><nowiki>[</nowiki>[[nil]], [[nil]]] [[call]] [[BIS_fnc_areEqualNotNil]]; {{codecomment|// false}}</code> |EXAMPLE2=
____________________________________________________________________________________________


| [[isEqualTo]], [[BIS_fnc_areEqual]] |SEEALSO=
| [[isEqualTo]], [[BIS_fnc_areEqual]] |SEEALSO=

Revision as of 22:41, 16 January 2021

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

Notes

Bottom Section