
3.EXECUTION MACRO FUNCTION B-63943EN-2/01
- 48 -
3.2.11 Subprogram Call Using M Code
Execution macro O9001 to O9003 is called as a subprogram using the
M code specified for compile parameters (Nos. 9010 to 9012).
Format
*1 When bit 2 (PCDC) of compile parameter (No. 9163) is set to 1,
a call can be made from an execution macro.
Local variable levels
By setting bit 3 (LCLLV) of compile parameter (No. 9163) to 1, the
level can be changed as in the case of macro calls when an execution
macro is called from a user program. In this case, all local variables
are set to <null> when an execution macro is called. (Series 16i
compatibility specifications)
When an execution macro is called from another execution macro, the
level remains unchanged as in the case where bit 3 (LCLLV) of
compile parameter (No. 9163) is set to 0. In this case, the local
variables at the call source are passed.
Correspondence between parameter numbers and program numbers
Program number Compile parameter number
O9001 9010
O9002 9011
O9003 9012
Mm L l ;
m : Call M code
l : Repetition count (1 by default)
1 to 999999999
User program
(*1)
Execution macro
O0001 ;
:
M200 L2 ;
:
M30 ;
O9001 ;
:
:
:
M99 ;
Compile parameter (No.9010)=200