not
Usage
-- Lingo syntax
not logicalExpression
// JavaScript syntax
! logicalExpression
Description
Operator; performs a logical negation on a logical expression. This is the equivalent of making a
value
TRUE
FALSE
known condition is not the case.
This logical operator has a precedence level of 5.
Example
This statement determines whether 1 is not less than 2:
-- Lingo syntax
put(not (1 < 2))
// JavaScript syntax
put(!(1 < 2));
Because 1 is less than 2, the result is 0, which indicates that the expression is
This statement determines whether 1 is not greater than 2:
-- Lingo syntax
put(not (1 > 2))
// JavaScript syntax
put(!(1 > 2));
Because 1 is not greater than 2, the result is 1, which indicates that the expression is
This handler sets
of its current setting:
-- Lingo syntax
on resetMenuItem
menu("Style").menuItem("Bold").checkMark = \
not (menu("Style").menuItem("Bold").checkMark)
end resetMenuItem
// JavaScript syntax
function resetMenuItem() {
menu("Style").menuItem("Bold").checkMark =
!(menu("Style").menuItem("Bold").checkMark)
}
See also
and,
or
614
Chapter 13: Operators
, and making a
FALSE
menu item property for Bold in the Style menu to the opposite
the checkMark
value
. It is useful when testing to see if a certain
TRUE
.
FALSE
.
TRUE
Need help?
Do you have a question about the DIRECTOR MX 2004-DIRECTOR SCRIPTING and is the answer not in the manual?
Questions and answers