nil: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
(formatting, added see also, category)
Line 7: Line 7:
____________________________________________________________________________________________
____________________________________________________________________________________________


| Nil value. This value can be used to undefine existing variables. |= Description
| Nil value. This value can be used to undefine existing [[Variables|variables]]. |= Description
____________________________________________________________________________________________
____________________________________________________________________________________________


| '''nil''' |= Syntax
| '''nil''' |= Syntax


| [[Any Value]] |= Return value
| [[Void]] |= Return value
____________________________________________________________________________________________
____________________________________________________________________________________________
   
   
|x1= <pre>variableToDestroy = nil</pre> |= Example 1
|x1= <code>variableToDestroy = [[nil]];</code> |= Example 1
____________________________________________________________________________________________
____________________________________________________________________________________________


| |= See also
| [[isNil]], [[Variables]] |= See also


}}
}}
Line 56: Line 56:
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting Commands Arma 3|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Scripting_Commands_Take_On_Helicopters|{{uc:{{PAGENAME}}}}]]
[[Category:Command_Group:_Variables|{{uc:{{PAGENAME}}}}]]

Revision as of 17:33, 21 April 2014

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:
Void

Examples

Example 1:
variableToDestroy = nil;

Additional Information

See also:
isNilVariables

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