MOVEFPTR Examples


Example 1:

 

DIM1

DIM

1

PTRD1

DIM

^

PTRD2

DIM

^

 

The following code would allow DIM1, PTRD1 or PTRD2 to reference the same variable:

 

  

MOVEADDR

DIM1,PTRD1

  

MOVEPTR

PTRD1,PTRD2 (PTRD1 & PTRD2 point to DIM1)

 

Example 2:

 

The following code would test whether PTRD1 has already been defined or linked:

 

  

MOVEPTR

PTRD1,PTRD1

  

GOTO

NULL IF OVER (PTRD1 is unattached if OVER)

 

Example 3:

 

The following code would unlink PTRD2:

 

  

MOVEPTR

0,PTRD2

 



PL/B Language Reference MOVEPLEN Examples MULTIPLY Examples