isEqualTypeParams: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - " " to " ") |
Lou Montana (talk | contribs) m (Text replacement - "<sqf>([^↵][^<]*↵[^<]*)<\/sqf>" to "<sqf> $1 </sqf>") |
||
(23 intermediate revisions by the same user not shown) | |||
Line 11: | Line 11: | ||
* [[nil]] could be used in template type array as a wild card to allow any type match | * [[nil]] could be used in template type array as a wild card to allow any type match | ||
|s1= input | |s1= input [[isEqualTypeParams]] template | ||
|p1= input: [[Anything]] - could be value of any type, but only type [[Array]] will be validated | |p1= input: [[Anything]] - could be value of any type, but only type [[Array]] will be validated | ||
Line 19: | Line 19: | ||
|r1= [[Boolean]] | |r1= [[Boolean]] | ||
|x1= < | |x1= <sqf> | ||
[1,2, | // These all return true | ||
[1,2, | [1,2,player,"10"] isEqualTypeParams [0,0,objNull,""]; | ||
[1,2, | [1,2,player,"10",true] isEqualTypeParams [0,0,nil,""]; | ||
[1,2,getPos player,"10",true] isEqualTypeParams [0,0,nil,""]; | |||
</sqf> | |||
|x2= < | |x2= <sqf> | ||
123 | // These all return false | ||
[] | 123 isEqualTypeParams [0,0,objNull,""]; | ||
[1,2, | [] isEqualTypeParams [0,0,objNull,""]; | ||
[1,2,player] isEqualTypeParams [0,0,objNull,""]; | |||
</sqf> | |||
|seealso= [[isEqualTypeAll]] | |seealso= [[isEqualTypeAll]] [[isEqualTypeAny]] [[isEqualType]] [[isEqualTypeArray]] [[param]] [[params]] [[isEqualTo]] [[typeName]] | ||
}} | }} |
Latest revision as of 19:42, 3 September 2024
Description
- Description:
- Compares types of all elements of input array to types of all elements of template array. Similar to isEqualTypeArray however this command is designed for fast validation of functions params, so there are differences:
- Groups:
- Variables
Syntax
- Syntax:
- input isEqualTypeParams template
- Parameters:
- input: Anything - could be value of any type, but only type Array will be validated
- template: Array - array of expected types
- Return Value:
- Boolean
Examples
- Example 1:
- Example 2:
Additional Information
- See also:
- isEqualTypeAll isEqualTypeAny isEqualType isEqualTypeArray param params isEqualTo typeName
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