Nothing: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
mNo edit summary
Line 1: Line 1:
'''Description:'''
A variable of type '''Nothing''' is an '''undefined variable'''. When converted to a string with [[str]] or [[format]], this variable will always return [[scalar bool array string 0xe0ffffef]] (in [[Armed Assault]]) or [[scalar bool array string 0xfcffffef]] (in [[Operation Flashpoint]]).
Nothing - no value.
 
== Undefining Variables ==
 
You can use [[nil]] to undefine variables.
 
myVar = 1;
...
myVar = nil;
myVar => undefined
 
== Comparisons ==
 
No comparison with variables of this type will work.
 
'''Example:'''
 
// error
[[if]] (undefinedVar == ...) [[then]] ...
 
// error
[[if]] (undefinedVar == undefinedVar) [[then]] ...




[[Category: Magic Types]]
[[Category: Magic Types]]

Revision as of 03:38, 22 December 2006

A variable of type Nothing is an undefined variable. When converted to a string with str or format, this variable will always return scalar bool array string 0xe0ffffef (in Armed Assault) or scalar bool array string 0xfcffffef (in Operation Flashpoint).

Undefining Variables

You can use nil to undefine variables.

myVar = 1;
...
myVar = nil;

myVar => undefined

Comparisons

No comparison with variables of this type will work.

Example:

// error
if (undefinedVar == ...) then ...
// error
if (undefinedVar == undefinedVar) then ...