! a: Difference between revisions

From Bohemia Interactive Community
Jump to navigation Jump to search
m (Text replacement - "{{Command " to "{{RV|type=command ")
m (Fix display title and sort key)
Line 1: Line 1:
{{RV|type=command
{{RV|type=command


| ofp
|displayTitle= ! a


|1.00
|sortKey = #


|gr1= Variables
|game1= ofp
|gr2= Math


| Returns a negation of Boolean expression. That means <tt>[[true]]</tt> becomes <tt>[[false]]</tt> and vice versa.  
|version1= 1.00


| [[Boolean]] <nowiki>=</nowiki> '''!''' a
|gr1= Variables
|gr2= Math


|p1= a: [[Boolean]]  
|descr= Returns a negation of Boolean expression. That means <tt>[[true]]</tt> becomes <tt>[[false]]</tt> and vice versa.


| [[Boolean]]  
|s1= [[Boolean]] {{=}} '''!''' a
 
|p1= a: [[Boolean]]
 
|r1= [[Boolean]]


|x1= The code
|x1= The code
<code>_a = [[alive]] [[player]];
<code>[[private]] _isAlive = [[alive]] [[player]];
[[if]] ([[!_a]]) [[then]] {
[[if]] ([[!_a|!]]_isAlive) [[then]] {
     [[hint]] "The player is dead!";
     [[hint]] "The player is dead!";
}</code>
}</code>
is the same as
is the same as
<code>_a = [[alive]] [[player]];
<code>[[private]] _isAlive = [[alive]] [[player]];
[[if]] [[not]] (_a) [[then]] {
[[if]] ([[not]] _isAlive) [[then]] {
     [[hint]] "The player is dead!";
     [[hint]] "The player is dead!";
}</code>  
}</code>  


| [[not]], [[Operators]]  
|seealso= [[not]], [[Operators]]  
}}
}}


 
[[Category:Scripting Commands OFP 1.99]]
 
[[Category:Scripting Commands OFP 1.96]]
[[Category:Scripting Commands|#]]
[[Category:Scripting Commands OFP 1.46]]
[[Category:Scripting Commands OFP 1.99|#]]
{{GameCategory|arma1|Scripting Commands}}
[[Category:Scripting Commands OFP 1.96|#]]
{{GameCategory|arma2|Scripting Commands}}
[[Category:Scripting Commands OFP 1.46|#]]
{{GameCategory|arma3|Scripting Commands}}
{{GameCategory|arma1|Scripting Commands|sortKey=#}}
{{GameCategory|arma2|Scripting Commands|sortKey=#}}
{{GameCategory|arma3|Scripting Commands|sortKey=#}}

Revision as of 22:49, 30 January 2021

Hover & click on the images for description

Description

Description:
Returns a negation of Boolean expression. That means true becomes false and vice versa.
Groups:
VariablesMath

Syntax

Syntax:
Boolean = ! a
Parameters:
a: Boolean
Return Value:
Boolean

Examples

Example 1:
The code private _isAlive = alive player; if (!_isAlive) then { hint "The player is dead!"; } is the same as private _isAlive = alive player; if (not _isAlive) then { hint "The player is dead!"; }

Additional Information

See also:
notOperators

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