ILE C/C++ Programmer's Guide
Before you use pointers in an ILE C/C++ program, consider the following
characteristics and constraints:
- In an equality operation (==,!=):
- A NULL pointer can be assigned to and compared for equality (==, !=) with
a pointer of any type.
- A pointer can be assigned to and compared for equality (==, !=) only with
a pointer of the same type or an open pointer; otherwise a compile-time
error occurs.
- The conditional expression if (!ptr) is equivalent to the
expression if (ptr == NULL).
- In a relational operation (<, >, <=, >=):
- A NULL pointer cannot be used with any pointer type.
- Only pointers to data objects or open pointers that contain pointers to
data objects can be used, otherwise a compile-time error or run-time exception
might occur.
- In arithmetic operations (+,-, ++, --, only pointers to
data objects can be used, otherwise a compile-time error will occur.
[ Top of Page | Previous Page | Next Page | Table of Contents ]
(C) Copyright IBM Corporation 1992, 2005. All Rights Reserved.