This content describes Snap 11. For Snap 10, the equivalent page will be in Snap 10 help

Next Topic

Book Contents

Book Index

Logical Functions

A Logical Function is used to determine the truth of some aspect of a variable. To use a function with a variable, follow the variable name with the function name or symbol.

For example, to determine whether the variable called AGE has a missing value, use:

AGE MISSING

At least one space must be left between the function name and variable name.

Table of logical functions for use with logical expressions

Function

Description

ER

Gives a TRUE result wherever the referenced variable has the result Error.

NA

Gives a TRUE result wherever the referenced variable has the result Not Asked.

NR

Gives a TRUE result wherever the referenced variable has the result No Reply.

MISSING

Gives a TRUE result wherever the referenced variable has the result Error, Not Asked or No Reply.

OK

Has exactly the opposite meaning to MISSING above.

See Also

Relational Operators

Logical Operators