HPlogo System Debug Reference Manual: HP 3000 MPE/iX Computer Systems > Chapter 8 System Debug Standard Functions

func u32

» 

Technical documentation

Complete book in PDF
» Feedback

 » Table of Contents

 » Index

Coerces an expression into an unsigned 32-bit value.

Syntax

   u32 (value)  


Formal Declaration

   u32:u32 (value:any) 

Parameters

value

An expression to be coerced. All types are valid.

Table 8-19 Derivation of the U32 Bit Pattern

Parameter TypeAction
BOOL1 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.
S64Transfer the low-order 32 bits.

LONG Class

EADDR

SADDR

Transfer the low-order 32 bits of the offset part.
STRTransfer 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 u32( 1 )

   $1



   $nmdat > wl u32( ffff )

   $ffff



   $nmdat > wl u32( ffff ):"#"

   #65535



   $nmdat > wl u32( 1234abcd )

   $1234abcd



   $nmdat > wl u32( -1 )

   $ffff



   $nmdat > wl u32( ffffffff ):"#"

   #4294967295



   $nmdat > wl u32( 1234.5678 )

   $5678



   $nmdat > wl u32( true )

   $1



   $nmdat > wl u32( "ABCDEFG" )

   $44454647



   $nmdat > wl u32( prog(1.2) )

   $2


Limitations, Restrictions

none

Feedback to webmaster