P = Q
is True just in case
P
and
Q
point to the same address; otherwise,
P <> Q
is True.
You can use the
+ and
- operators to increment and decrement the offset of a character pointer. You can also
use
- to calculate the difference between the offsets of two character pointers. The following rules apply.
If
I
is an integer and
P
is a character pointer, then
P + I
adds
I
to the address given by
P
; that is, it returns a
pointer
to the address
I
characters after
P
. (The expression
I + P
is equivalent to
P + I
.)
P - I
subtracts
I
from
the address given by
P
; that is, it returns a pointer to the address
I
characters before
P
. This is true for
PChar pointers; for PWideChar pointers
P + I
adds
SizeOf(WideChar)
to
P
.
If
P
and
Q
are
both character pointers, then
P - Q
computes the difference between the address given by
P
(the higher address) and the address given by
Q
(the lower address); that is, it returns an integer denoting the
number
of characters between
P
and
Q
.
P + Q
is not defined.
Set Operators
The following operators take sets as operands.
Dostları ilə paylaş: