LROUTINE Examples


Example 1:

 

#JULEAN

DIM

^

#MONTH

FORM

^

#DAY

FORM

^

#YEAR

FORM

^

JULNDATE

LROUTINE

#JULEAN,#MONTH,#DAY,#YEAR

  

...

 

  

RETURN

 

 

The LROUTINE JULNDATE is defined using four parameters. During the execution of the subroutine, reference to any of the variables on the LROUTINE list actually refer to the corresponding variables on the CALL list. This example also shows the usage of local labels that start with a '#' character.

 

Example 2:

 

ARRAY

DIM

10(5)

  

...

 

  

CALL

DOIT USING ARRAY

  

...

 

  

...

 

XPTR

DIM

^(5)

DOIT

LROUTINE

XPTR

 

The LROUTINE DOIT is defined as using 5 parameters (An array of 5 elements). During the execution of the subroutine, reference to any of the variables on the LROUTINE list actually refer to the corresponding variables on the CALL list.

 



PL/B Language Reference LOWERCASE Examples MACRO Example