isEqualTypeParams: Difference between revisions
Jump to navigation
Jump to search
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
Lou Montana (talk | contribs) m (Text replacement - "<code>([^<]*)\[\[([a-zA-Z][a-zA-Z0-9_]+)\]\]([^<]*) *<\/code>" to "<code>$1$2$3</code>") |
||
Line 20: | Line 20: | ||
|x1= <code>// These all return true | |x1= <code>// These all return true | ||
[1,2,player,"10"] isEqualTypeParams [0,0, | [1,2,player,"10"] isEqualTypeParams [0,0,objNull,""]; | ||
[1,2,[[player]],"10",[[true]]] [[isEqualTypeParams]] [0,0,[[nil]],""]; | [1,2,[[player]],"10",[[true]]] [[isEqualTypeParams]] [0,0,[[nil]],""]; | ||
[1,2,getPos player,"10",true] isEqualTypeParams [0,0,nil,""];</code> | [1,2,getPos player,"10",true] isEqualTypeParams [0,0,nil,""];</code> | ||
Line 26: | Line 26: | ||
|x2= <code>// These all return false | |x2= <code>// These all return false | ||
123 isEqualTypeParams [0,0,objNull,""]; | 123 isEqualTypeParams [0,0,objNull,""]; | ||
[] | [] isEqualTypeParams [0,0,[[objNull]],""]; | ||
[1,2,player] isEqualTypeParams [0,0,objNull,""];</code> | [1,2,player] isEqualTypeParams [0,0,objNull,""];</code> | ||
|seealso= [[isEqualTypeAll]] [[isEqualTypeAny]] [[isEqualType]] [[isEqualTypeArray]] [[param]] [[params]] [[isEqualTo]] [[typeName]] | |seealso= [[isEqualTypeAll]] [[isEqualTypeAny]] [[isEqualType]] [[isEqualTypeArray]] [[param]] [[params]] [[isEqualTo]] [[typeName]] | ||
}} | }} |
Revision as of 13:02, 12 May 2022
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:
// These all return true [1,2,player,"10"] isEqualTypeParams [0,0,objNull,""]; [1,2,player,"10",true] isEqualTypeParams [0,0,nil,""]; [1,2,getPos player,"10",true] isEqualTypeParams [0,0,nil,""];
- Example 2:
// These all return false 123 isEqualTypeParams [0,0,objNull,""]; [] isEqualTypeParams [0,0,objNull,""]; [1,2,player] isEqualTypeParams [0,0,objNull,""];
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