B: newptr = _bcdptr(oldptr, offset);
C: void *_bcdptr(void *oldptr,int offset);
_BCDPTR creates BCD pointer. This is a special type of pointer guaranteed to point to a BCD character. For example,
new = _bcdptr(old,-1)
returns a pointer to the BCD character immediately preceding the one indicated by "old". "old" can be a pointer to a word boundary, or to another BCD character.
BCD pointers can only be used in a limited set of operations: comparisons for equality/inequality and assignments. The BCD string indicated by a BCD pointer can be printed with the "%_s" placeholder of "printf" and related routines.
Copyright © 1996, Thinkage Ltd.