nil: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replace - "</dt>" to "")
m (Text replace - "</dd>" to "")
Line 29: Line 29:


Array content is 'destroyed' when no more ArrayName'''s''' refer to the content.
Array content is 'destroyed' when no more ArrayName'''s''' refer to the content.
</dd>
 


<dt class="note">'''[[User:Worldeater|Worldeater]]'''<dd class="note">
<dt class="note">'''[[User:Worldeater|Worldeater]]'''<dd class="note">
Line 40: Line 40:
   foo = nil;
   foo = nil;
   hint foo; // displays "bar"
   hint foo; // displays "bar"
</dd>
 





Revision as of 13:36, 21 October 2011

Hover & click on the images for description

Description

Description:
Nil value. This value can be used to undefine existing variables.
Groups:
Uncategorised

Syntax

Syntax:
nil
Return Value:
Any Value

Examples

Example 1:
variableToDestroy = nil

Additional Information

See also:
See also needed

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

Mikero
Note that ArrayName = nil destroys the arrayNAME not the array content. Array content is 'destroyed' when no more ArrayNames refer to the content.
Worldeater
Never ever assign a value to nil! Doing so creates a global variable with the same name that overrides the "command" nil: foo = "foo"; nil = "bar"; foo = nil; hint foo; // displays "bar"

Bottom Section