Object-reference relation conditions

A data item of usage OBJECT REFERENCE can be compared for equality or inequality with another data item of usage OBJECT REFERENCE or with NULL, NULLS, or SELF.

Format 4: object-reference relation condition

Read syntax diagramSkip visual syntax diagramobject-reference-identifier-1SELFNULLNULLSISNOTEQUALTO = object-reference-identifier-2SELFNULLNULLS

A comparison with SELF is allowed only in a method.

Two object-references compare equal only if the data items identify the same object.