Logical Not Operator - MACROMEDIA FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE Reference

Actionscript 2.0 language reference
Table of Contents

Advertisement

Returns
- A Boolean result of the logical operation.
Boolean
See also
&& logical AND operator

! logical NOT operator

! expression
Inverts the Boolean value of a variable or expression. If
absolute or converted value
evaluates to
, the expression
y
false
The following expressions illustrate the result of using the logical NOT (!) operator:
returns
! true
false! false
Availability: ActionScript 1.0; Flash Player 4
Operands
expression : Boolean
Returns
- The Boolean result of the logical operation.
Boolean
Example
In the following example, the variable
condition
, and if the condition is
!happy
Output panel.
var happy:Boolean = false;
if (!happy) {
trace("don't worry, be happy"); //traces don't worry, be happy
}
The statement traces because
See also
!= inequality operator
,
operator
|| logical OR operator
operator
174
ActionScript language elements
, the value of
true
!(x && y)
returns
true
- An expression or a variable that evaluates to a Boolean value.
is set to
happy
true
equals
!false
true
,
!== strict inequality operator
,
== equality operator
expression
is
!expression
false
evaluates to
.
true
. The
false
if
, the trace() statement sends a string to the
.
,
,
=== strict equality
is a variable with the
. If the expression
x &&
condition evaluates the
&& logical AND

Hide quick links:

Advertisement

Table of Contents
loading
Need help?

Need help?

Do you have a question about the FLASH 8-ACTIONSCRIPT 2.0 LANGUAGE and is the answer not in the manual?

Subscribe to Our Youtube Channel

This manual is also suitable for:

Flash 8

Table of Contents

Save PDF