PERFORMF Examples


Example 1:

 

  

PERFORMF

FKEY1,FKEY2,FKEY3,FKEY4,FKEY5:

  

  

FKEY6,FKEY7,FKEY8,FKEY9,FKEY10

 

If Function Flag F1 (Function key 1) were set due to it being pressed during a KEYIN, the subroutine designated by the Program Execution Label FKEY1 would be initiated. If Function key 2 had been pressed, the subroutine designated by FKEY2 would be initiated. If F3 were set, FKEY3 would be initiated and so on. Entering a Function key number without a corresponding Program Execution Label causes the program to fall through the PERFORMF routine to the next sequential instruction.

 

Example 2:

 

  

PERFORMF

FKEY1,,,,FKEY5,FKEY6,,,,FKEY10

 

If Function Flag F1 (Function key 1) were set due to it being pressed during a KEYIN, the subroutine designated by the Program Execution Label FKEY1 would be initiated. If Function key 5 had been pressed, the subroutine designated by FKEY2 would be initiated. Entering a Function key number without a corresponding Program Execution Label causes the program to fall through the PERFORMF routine to the next sequential instruction.

 



PL/B Language Reference PERFORM Examples PFILE Examples