1. Relational and Boolean

Commands for comparing objects and performing logical and bitwise operations.

2. Overview

Equality operators compare objects, ordered comparisons accept numbers or strings, and logical operators also support bitwise operations on integers. All commands in this category are available in PostScript Level 1 and higher.

3. Commands

Command Description

eq

Test two objects for equality.

ne

Test two objects for inequality.

ge

Test whether the first operand is greater than or equal to the second.

gt

Test whether the first operand is greater than the second.

le

Test whether the first operand is less than or equal to the second.

lt

Test whether the first operand is less than the second.

and

Compute logical or bitwise AND.

or

Compute logical or bitwise inclusive OR.

xor

Compute logical or bitwise exclusive OR.

not

Negate a boolean or complement the bits of an integer.

true

Push the boolean value true.

false

Push the boolean value false.