Lingo Dictionary > L-N > not

 

not

Syntax

not logicalExpression 

Description

Operator; performs a logical negation on a logical expression. This is the equivalent of making a TRUE value FALSE, and making a FALSE value TRUE. It is useful when testing to see if a certain 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:

put not (1 < 2)

Because 1 is less than 2, the result is 0, which indicates that the expression is FALSE.

Example

This statement determines whether 1 is not greater than 2:

put not (1 > 2)

Because 1 is not greater than 2, the result is 1, which indicates that the expression is TRUE.

Example

This handler sets the checkMark menu item property for Bold in the Style menu to the opposite of its current setting:

on resetMenuItem
	the checkMark of menuItem("Bold") of menu("Style") = \
	not (the checkMark of menuItem("Bold") of menu("Style"))
end resetMenuItem

See also

and, or