Important Notice
The pages on this site contain documentation for very old MS-DOS software,
purely for historical purposes.
If you're looking for up-to-date documentation, particularly for programming,
you should not rely on the information found here, as it will be woefully
out of date.
CONVERTPTR Details (↑ Allowing Language Features)
◄Key► ◄Summary► ◄Up► ◄Contents► ◄Index► ◄Back►
────────────────────────────────────────────────────────────────────────────
IBM VS COBOL II and COBOL/370 let you use the REDEFINES clause on a
POINTER data item, to redefine it as a PIC 9(9) COMP data item. You
can then perform arithmetic operations on this item, giving the
program the ability to shift the address referred to by a pointer
up or down.
If CONVERTPTR is specified, pointers are held in a form that is
reversed with respect to native byte ordering. They are converted to
the native form immediately before any SET ADDRESS OF linkage-item TO
pointer statement, and immediately after any SET pointer TO ADDRESS OF
... statement.
The CONVERTPTR directive has no effect on PROCEDURE-POINTER data
items.
Unexpected behavior may occur if the arithmetic carried out causes the
pointer to cross the boundary of a data segment.
-♦-