BIS fnc arrayCompare: 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 | ||
| arma2 | | arma2 | ||
|1.00 | |1.00 | ||
|gr1= Arrays | |gr1= Arrays | ||
| This function checks if two arrays are containing the same elements in the same order. | | This function checks if two arrays are containing the same elements in the same order. | ||
{{Important|This function is deprecated in {{arma2}} as it fails with certain data types; see [[BIS_fnc_areEqual]] for {{arma2}}.}} | {{Important|This function is deprecated in {{arma2}} as it fails with certain data types; see [[BIS_fnc_areEqual]] for {{arma2}}.}} | ||
{{Feature|arma3|Use [[isEqualTo]] instead.}} | {{Feature|arma3|Use [[isEqualTo]] instead.}} | ||
| [array1, array2] call [[BIS_fnc_arrayCompare]] | | [array1, array2] call [[BIS_fnc_arrayCompare]] | ||
|p1= array1: [[Array]] | |p1= array1: [[Array]] | ||
|p2= array2: [[Array]] | |p2= array2: [[Array]] | ||
| [[Boolean]] | | [[Boolean]] | ||
|x1= <code>_array1 = [0,1,2]; | |x1= <code>_array1 = [0,1,2]; | ||
_array2 = [0,1,2]; | _array2 = [0,1,2]; | ||
[_array1, _array2] [[call]] [[BIS_fnc_arrayCompare]]; {{codecomment|// returns [[true]]}}</code> | [_array1, _array2] [[call]] [[BIS_fnc_arrayCompare]]; {{codecomment|// returns [[true]]}}</code> | ||
| [[BIS_fnc_areEqual]], [[BIS_fnc_areEqualNotNil]], [[isEqualTo]] | | [[BIS_fnc_areEqual]], [[BIS_fnc_areEqualNotNil]], [[isEqualTo]] | ||
}} | }} | ||
Revision as of 22:39, 17 January 2021
Description
- Description:
- This function checks if two arrays are containing the same elements in the same order.
- Execution:
- call
- Groups:
- Arrays
Syntax
- Syntax:
- [array1, array2] call BIS_fnc_arrayCompare
- Parameters:
- array1: Array
- array2: Array
- Return Value:
- Boolean
Examples
- Example 1:
_array1 = [0,1,2]; _array2 = [0,1,2]; [_array1, _array2] call BIS_fnc_arrayCompare; // returns true
Additional Information
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