Anything: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
mNo edit summary
m (Some wiki formatting)
 
(5 intermediate revisions by 2 users not shown)
Line 1: Line 1:
A variable of type '''Anything''' may be of any [[:Category: Data Types|data types]] '''or''' [[Nothing]].
A variable of type '''Anything''' may be of any [[:Category: Data Types|data types]] '''or''' [[Nothing]].


{{Feature|warning|Even though some commands list data type '''Anything''' as possible value, passing [[nil]] ([[Nothing]]) to a command might cause it to not work.}}
{{Feature|warning|
{{Wiki|todo|Add an example to explain the above statement.}}
Even though some commands list data type '''Anything''' as possible value, passing [[nil]] ([[Nothing]]) to a command might cause it not to work:
[[str]] [[nil]]; {{cc|Returns [[Nothing]]. While this works, it does not make much sense}}
<sqf>str nil; // while the documentation for str states it takes Anything, nil / Nothing will cause it to not execute.</sqf>
}}
 
== See Also ==
 
* [[nil]]
* [[isNil]]
* [[Nothing]]
 
 
[[Category: Magic Types]]
[[Category: Magic Types]]

Latest revision as of 22:31, 15 September 2022

A variable of type Anything may be of any data types or Nothing.

Even though some commands list data type Anything as possible value, passing nil (Nothing) to a command might cause it not to work:
str nil; // while the documentation for str states it takes Anything, nil / Nothing will cause it to not execute.

See Also