PROCEDURE Example


Example:

 

#JULEAN

DIM

5

#MONTH

FORM

2

#DAY

FORM

2

#YEAR

FORM

2

JULNDATE

PROCEDURE

USING #JULEAN,#MONTH,#DAY,#YEAR

  

...

 

  

RETURN

 

 

The PROCEDURE JULNDATE is defined using four parameters. During the CALL to the subroutine, up to four variables in the calling list are moved to the corresponding four variables of the procedure list. Any variables left over in the procedure list are CLEARed. When the RETURN instruction is executed all variables are moved back to the original variables as specified by the calling list. This example also shows the usage of local labels that start with a '#' character. This example could also be defined as a separately compiled subroutine that would be automatically loaded when referenced. See LOADMOD or CALL for more information.

 



PL/B Language Reference Print Preview Example PROFILE Example