8-26
8.16.2 Calling with Reference
A local variable can be passed as an argument.
To designate an entire array as an argument, put the array name in
parentheses.
When the contents of a variable passed by calling with reference are changed
in the program to be called, the change is valid even if the flow returns to the
calling program.
Example 1: If you call the program PROGRAM SUB1 (AA#)
• If a local variable is passed 1 (When DD has been declared with DEFDBL)
CALL SUB1 (DD#)
• If a local variable is passed 2 (When DA has been declared with DEFDBL)
CALL SUB1 (DA)
Note: A value must be assigned to a local variable beforehand. In the
following case, use a value to pass.
CALL SUB1 (D1)
Example 2: If the program PROGRAM SUB2 (BB% (10)) is called
• If the entire array is called (When AB% (10) has been declared with DIM)
CALL SUB2 (AB% ())
Comments to this Manuals