isEqualTypeAll: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "\{\{GameCategory\|(arma[0123])\|[ _]?New[ _]Scripting[ _]Commands[ _]List\}\}" to "{{GameCategory|$1|New Scripting Commands}}")
m (Text replacement - "_{10,} " to "")
Line 1: Line 1:
{{Command|Comments=
{{Command|Comments=
____________________________________________________________________________________________


| arma3 |Game name=
| arma3 |Game name=
Line 10: Line 9:
|gr2= Arrays |GROUP2=
|gr2= Arrays |GROUP2=


____________________________________________________________________________________________


| Compares types of all elements of an array to the type of a single value.
| Compares types of all elements of an array to the type of a single value.
|DESCRIPTION=
|DESCRIPTION=
____________________________________________________________________________________________


| arr '''isEqualTypeAll''' val |SYNTAX=
| arr '''isEqualTypeAll''' val |SYNTAX=
Line 22: Line 19:


| [[Boolean]] |RETURNVALUE=
| [[Boolean]] |RETURNVALUE=
____________________________________________________________________________________________
   
   
|x1= <code>_arr = [1,2,3,4,5,6,7,8,9,0];
|x1= <code>_arr = [1,2,3,4,5,6,7,8,9,0];
Line 28: Line 24:
_arr [[isEqualTypeAll]] 0; //true</code> |EXAMPLE1=
_arr [[isEqualTypeAll]] 0; //true</code> |EXAMPLE1=


____________________________________________________________________________________________


|[[isEqualTypeArray]], [[isEqualTypeAny]], [[isEqualType]], [[isEqualTypeParams]], [[param]], [[params]], [[isEqualTo]], [[typeName]]|SEEALSO=
|[[isEqualTypeArray]], [[isEqualTypeAny]], [[isEqualType]], [[isEqualTypeParams]], [[param]], [[params]], [[isEqualTo]], [[typeName]]|SEEALSO=

Revision as of 02:44, 17 January 2021

Hover & click on the images for description

Description

Description:
Compares types of all elements of an array to the type of a single value.
Groups:
VariablesArrays

Syntax

Syntax:
arr isEqualTypeAll val
Parameters:
arr: Array
val: Anything
Return Value:
Boolean

Examples

Example 1:
_arr = [1,2,3,4,5,6,7,8,9,0]; _arr isEqualTypeAll ""; //false _arr isEqualTypeAll 0; //true

Additional Information

See also:
isEqualTypeArrayisEqualTypeAnyisEqualTypeisEqualTypeParamsparamparamsisEqualTotypeName

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

Notes

Bottom Section

Posted on November 25, 2015 - 17:55 (UTC)
Commy2
This command will return false if the array on the left side is empty ([]) regardless of the sample value.
[] isEqualTypeAll "" -> false