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

func saddr

MPE documents

Complete PDF
Table of Contents
Index

E0201 Edition 4 ♥
E0300 Edition 3
E0692 Edition 3

Coerces an expression into a secondary address.

Syntax



    saddr (value)

Formal Declaration



   saddr:saddr (value:any)

Parameters


value

An expression to be coerced. All types are valid.

Table 10-14 Derivation of the EADDR Bit Pattern

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

Examples



   $nmdat > wl saddr( 1 )
   SADDR $0.1

   $nmdat > wl saddr( ffff )
   SADDR $0.ffff

   $nmdat > wl saddr( 1234abcd )
   SADDR $0.1234abcd

   $nmdat > wl saddr( -1 )
   SADDR $0.ffffffffffffffff

   $nmdat > wl saddr( 1234.5678 )
   SADDR $1234.5678

   $nmdat > wl saddr( true )
   SADDR $0.1

   $nmdat > wl saddr( prog(1.2) )
   SADDR $1.2

Limitations, Restrictions


none




func s64


func sid