DataBasic Reference > Statements and Intrinsic Functions > N > NOT Function

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

RealityV15.1Online Documentation (MoTW) Revision 7

NOT Function (DataBasic) (m618703+not_f.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

NOT Function

Returns the logical inverse of an expression.

Syntax

NOT(expression)

Syntax Elements

expression A DataBasic expression to be evaluated as a logical expression:

For details of the logical values of different types of expression, refer to Logical Expressions.

Comments

NOT returns a value of true (1) if expression evaluates to 0 and returns a value of false (0) if expression evaluates to a nonzero quantity.

Examples

X = NOT(X="")

Assigns the value 1 to variable X, because NOT(X="") is a true statement.

A = 1
B = 5
PRINT NOT(A AND B)

Prints 0 (zero), because the logical inverse of A AND B evaluates to false.

IF NOT(X1) THEN STOP

Terminates program if current value of variable X1 is 0.

PRINT NOT(M)

Prints a value of 1 if the current value of variable M is 0 or a null string; otherwise, prints a zero. If M is nonnumeric, an error message is returned.

PRINT NOT(5 LT 1)

Prints a value of 1.

RealityV15.1 (MoTW) Revision 7Comment on this topic