System Debug Reference Manual (32650-90888)
Chapter 10 443
System Debug Standard Functions
func sptr
Limitations, Restrictions
none
func sptr
Coerces an expression into a short pointer.
Syntax
sptr (
value
)
Formal Declaration
sptr:sptr (
value
:any)
Parameters
value
An expression to be coerced. All types are valid.
Examples
$nmdat > wl sptr( 1 )
$1
$nmdat > wl sptr( ffff )
$ffff
Table 10-15. Derivation of the SPTR Bit Pattern
Parameter Type Action
BOOL 1 if TRUE, 0 if FALSE.
U16
S16
Right justify the original 16-bit value in 32 bits with zero fill.
U32
S32
SPTR
Transfer the original bit pattern unchanged.
LONG Class Transfer the low-order 32 bits of the address (offset part) unchanged. The
segment number or SID part of the address is discarded.
EADDR
SADDR
Transfer the low-order 32 bits of the address (offset part). All other parts
of the address are discarded.
STR Transfer the ASCII bit pattern for the last four characters in the string.
Strings shorter than four characters are treated as if they were extended
on the left with nulls.