System Debug Reference Manual (32650-90888)

Chapter 10 437
System Debug Standard Functions
func s16
Syntax
s16 (
value
)
Formal Declaration
s16:s16 (
value
:any)
Parameters
value
An expression to be coerced. All types are valid.
Examples
$nmdat > wl s16( 1 )
$1
$nmdat > wl s16( ffff )
$ffff
$nmdat > wl s16( ffff ):"#"
#-1
$nmdat > wl s16( 1234abcd )
$abcd
$nmdat > wl s16( -1 )
$ffff
$nmdat > wl s16( 1234.5678 )
$5678
Table 10-11. Derivation of the S16 Bit Pattern
Parameter Type Action
BOOL 1 if TRUE, 0 if FALSE.
U16
S16
Transfer the original bit pattern unchanged.
U32
S32
S64
SPTR
Transfer the low-order 16 bits.
LONG Class
EADDR
SADDR
Transfer the low-order 16 bits of the offset part.
STR Transfer the ASCII bit pattern for the last two characters in the string.
Strings shorter than two characters are treated as if they were extended
on the left with nulls.