isNull: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
No edit summary
(isNull does not accept type side, wikify example)
Line 17: Line 17:
* [[Location]]s -> [[locationNull]] (since ARMA 2)
* [[Location]]s -> [[locationNull]] (since ARMA 2)
* [[Task]]s -> [[taskNull]] (since ARMA 2)
* [[Task]]s -> [[taskNull]] (since ARMA 2)
* [[Side]]s -> [[sideUnknown]] (since ARMA 2)


Note: A test via <nowiki>==</nowiki> does not work, because, for example, [[objNull]] is not equal to anything, not even to itself. |= Description
Note: A test via <nowiki>==</nowiki> does not work, because, for example, [[objNull]] is not equal to anything, not even to itself. |= Description
Line 24: Line 23:
| '''isNull''' obj |= Syntax
| '''isNull''' obj |= Syntax


|p1 = obj: [[Object]], [[Control]], [[Display]], [[Group]] (or [[Location]], [[Task]], [[Side]] since ARMA 2) |= Parameter 1
|p1 = obj: [[Object]], [[Control]], [[Display]], [[Group]] (or [[Location]], [[Task]] since ARMA 2) |= Parameter 1


| [[Boolean]] |= Return value
| [[Boolean]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
|x1 = <code>if (isNull obj) then {hint "doesn't exist"} </code>


| [[controlNull]], [[displayNull]], [[grpNull]], [[locationNull]], [[objNull]], [[taskNull]], [[teamMemberNull]], [[sideUnknown]] |= See also
|x1 = <code>[[if]] ([[isNull]] obj) [[then]] {[[hint]] "doesn't exist";};</code>
 
| [[controlNull]], [[displayNull]], [[grpNull]], [[locationNull]], [[objNull]], [[taskNull]], [[teamMemberNull]] |= See also


}}
}}

Revision as of 18:38, 17 April 2014

Hover & click on the images for description

Description

Description:
Checks whether the tested item is Null.
Which null type the item has to be equal to depends on the type of object tested:
Note: A test via == does not work, because, for example, objNull is not equal to anything, not even to itself.
Groups:
Uncategorised

Syntax

Syntax:
isNull obj
Parameters:
obj: Object, Control, Display, Group (or Location, Task since ARMA 2)
Return Value:
Boolean

Examples

Example 1:
if (isNull obj) then {hint "doesn't exist";};

Additional Information

See also:
controlNulldisplayNullgrpNulllocationNullobjNulltaskNullteamMemberNull

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