Rational Developer for System z
COBOL for Windows, Version 7.5, Language Reference


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
Read syntax diagramSkip visual syntax diagram>>-+-object-reference-identifier-1-+--+----+--+-----+----------->
   +-SELF--------------------------+  '-IS-'  '-NOT-'  
   +-NULL--------------------------+                   
   '-NULLS-------------------------'                   
 
>--+-EQUAL--+----+-+--+-object-reference-identifier-2-+--------><
   |        '-TO-' |  +-SELF--------------------------+  
   '- = -----------'  +-NULL--------------------------+  
                      '-NULLS-------------------------'  
 

A comparison with SELF is allowed only in a method.

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


Terms of use | Feedback

Copyright IBM Corporation 1996, 2008.
This information center is powered by Eclipse technology. (http://www.eclipse.org)