HPlogo System Debug Reference Manual > Chapter 10 System Debug Standard Functions

func lptr

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

Coerces an expression into a long pointer.

Syntax



   lptr (value)

Formal Declaration



   lptr:lptr (value:any)

Parameters


value

An expression to be coerced. All types are valid.

Table 10-7 Derivation of the LPTR Bit Pattern

Parameter Type Action
BOOL0.1 if TRUE, 0.0 if FALSE.
U16
U32
SPTR
Set the SID part to zero. Right justify the original value in the low-order 32 bits of the offset part with zero fill.
S16
S32
S64
Set the SID part to zero. Right justify the original value in the low-order 32 bits of the offset part with sign extension.
LONG ClassTransfer both parts of the address unchanged.
EADDR
SADDR
Transfer the SID part unchanged. Transfer the low-order 32 bits of the offset part.
STRTransfer the ASCII bit pattern for the last eight characters in the string. Strings shorter than eight characters are treated as if they were extended on the left with nulls.

Examples



   $nmdat > wl lptr( 1 )
   $0.1

   $nmdat > wl lptr( ffff )
   $0.ffff

   $nmdat > wl lptr( 1234abcd )
   $0.1234abcd

   $nmdat > wl lptr( -1 )
   $0.ffffffff

   $nmdat > wl lptr( 1234.5678 )
   $1234.5678

   $nmdat > wl lptr( true )
   $0.1

   $nmdat > wl lptr( "ABCDEFG" )
   $414243.4445464

   $nmdat > wl lptr( prog(1.2) )
   $1.2

Limitations, Restrictions


none




func logtoabs


func lpub