func sptr [ System Debug Reference Manual ] MPE/iX 5.0 Documentation
System Debug Reference Manual
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.
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. |
| | |
--------------------------------------------------------------------------------------------
| | |
| LPTR PROG GRP PUB LGRP | Transfer the low-order 32 bits of the address (offset part) |
| LPUB SYS USER TRANS CST | unchanged. The segment number or SID part of the address is |
| CSTX | 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. |
| | |
--------------------------------------------------------------------------------------------
Examples
$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
Limitations, Restrictions
none
MPE/iX 5.0 Documentation