BIS fnc areEqual: Difference between revisions
Jump to navigation
Jump to search
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...) |
Lou Montana (talk | contribs) m (Some wiki formatting) |
||
(22 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
{{ | {{RV|type=function | ||
| arma2 | |game1= arma2 | ||
|version1= 1.00 | |||
|1. | |game2= arma2oa | ||
|version2= 1.50 | |||
| | |game3= tkoh | ||
|version3= 1.00 | |||
| This function returns true if all of the passed data elements are of the same type and value. One or more elements can be passed. | |game4= arma3 | ||
|version4= 0.50 | |||
* This function is an improvement over the | |gr1= Variables | ||
|descr= This function returns true if all of the passed data elements are of the same type and value. One or more elements can be passed. | |||
{{Feature|arma3|In {{arma3}}, see [[isEqualTo]].}} | |||
Note: | |||
* This function is an improvement over the == operator because it can handle any data type in any combination. | |||
* For arrays, it returns true if both arrays hold the same elements in the same order. | * For arrays, it returns true if both arrays hold the same elements in the same order. | ||
* If both values are undefined / nil / null, then this function will return true. | * If both values are undefined / nil / null, then this function will return true. | ||
| [anything1, anything2, | |pr= EXTREMELY large strings (> 4k) or compiled code (from a file, for example) might not be properly compared if they are only different near the end of the file. | ||
|s1= [anything1, anything2, ..., anythingN] call [[BIS_fnc_areEqual]] | |||
|p1= | |p1= anythingM: [[Anything]] - any [[:Category:Data_Types|data type]] | ||
| [[Boolean]] | |r1= [[Boolean]] | ||
|x1= < | |x1= <sqf> | ||
[0, 1 + 1 - 2] | [0, "0"] call BIS_fnc_areEqual; // false | ||
[0, 1 + 1 - 2] call BIS_fnc_areEqual; // true | |||
[str 50, "50"] call BIS_fnc_areEqual; // true | |||
</sqf> | |||
| [[isEqualTo]] | |seealso= [[isEqualTo]] [[BIS_fnc_areEqualNotNil]] | ||
}} | }} | ||
Latest revision as of 22:12, 30 March 2024
Description
- Description:
- This function returns true if all of the passed data elements are of the same type and value. One or more elements can be passed.
Note:
- This function is an improvement over the == operator because it can handle any data type in any combination.
- For arrays, it returns true if both arrays hold the same elements in the same order.
- If both values are undefined / nil / null, then this function will return true.
- Execution:
- call
- Problems:
- EXTREMELY large strings (> 4k) or compiled code (from a file, for example) might not be properly compared if they are only different near the end of the file.
- Groups:
- Variables
Syntax
- Syntax:
- [anything1, anything2, ..., anythingN] call BIS_fnc_areEqual
- Parameters:
- anythingM: Anything - any data type
- Return Value:
- Boolean
Examples
- Example 1:
Additional Information
- See also:
- isEqualTo BIS_fnc_areEqualNotNil
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