BIS fnc arrayCompare: Difference between revisions
Jump to navigation
Jump to search
m (Text replacement - "{{Feature arma3|" to "{{Feature|arma3|") |
Lou Montana (talk | contribs) m (Text replacement - "_{10,} " to "") |
||
Line 1: | Line 1: | ||
{{Function|Comments= | {{Function|Comments= | ||
| arma2 |Game name= | | arma2 |Game name= | ||
Line 7: | Line 6: | ||
|gr1= Arrays|GROUP1= | |gr1= Arrays|GROUP1= | ||
| 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.}}|Description= | {{Feature|arma3|Use [[isEqualTo]] instead.}}|Description= | ||
| [array1, array2] call [[BIS_fnc_arrayCompare]] |Syntax= | | [array1, array2] call [[BIS_fnc_arrayCompare]] |Syntax= | ||
Line 21: | Line 18: | ||
| [[Boolean]] |Return value= | | [[Boolean]] |Return value= | ||
|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> |Example 1= | [_array1, _array2] [[call]] [[BIS_fnc_arrayCompare]]; {{codecomment|// returns [[true]]}}</code> |Example 1= | ||
| [[BIS_fnc_areEqual]], [[BIS_fnc_areEqualNotNil]], [[isEqualTo]] |See also= | | [[BIS_fnc_areEqual]], [[BIS_fnc_areEqualNotNil]], [[isEqualTo]] |See also= |
Revision as of 22:40, 16 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