|
|
Coerces an expression into a short pointer.
sptr (value)
sptr:sptr (value:any)
- value
An expression to be coerced. All types are valid.
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. |
$nmdat > wl sptr( 1 )
$1
$nmdat > wl sptr( ffff )
$ffff
$nmdat > wl sptr( 1234abcd )
$1234abcd
$nmdat > wl sptr( -1 )
$ffffffff
$nmdat > wl sptr( 1234.5678 )
$5678
$nmdat > wl sptr( true )
$1
$nmdat > wl sptr( "ABCDEFG" )
$44454647
$nmdat > wl sptr( prog(1.2) )
$2
None
|