[<m>,<n>,<o>]: Array size
Currently, up to 3-dimensional arrays are possible:
<m>: Array size for 1st dimension
<n>: Array size for 2nd dimension
<o>: Array size for 3rd dimension
Note
● The program name specified after the PROC keyword must match the program name
assigned on the user interface.
● With arrays of an undefined array length, subprograms can process arrays of variable length
as formal parameter. When defining a two-dimensional array as a formal parameter, for
example, the length of the 1st dimension is not specified. However, the comma must be
written.
Example: PROC <program name> (VAR REAL ARRAY[,5])
Example
Definition of a subprogram with two parameters as reference to REAL type:
Program code
; Parameter 1: Reference to type: REAL, name: LENGTH
; Parameter 2: Reference to type: REAL, name: WIDTH
PROC SUB_PROG(VAR REAL LENGTH, VAR REAL WIDTH)
See also
Subprogram call with parameter transfer (EXTERN) (Page 524)
3.2.2.4 Save modal G functions (SAVE)
The SAVE attribute means that before the subprogram call, active modal G commands are
saved and are reactivated after the end of the subprogram.
NOTICE
Interrupt continuous-path mode
If, for active continuous-path mode, a subprogram is called with the SAVE attribute, the
continuous-path mode is interrupted at the end of the subprogram (return jump).
Syntax
PROC <subprogram name> SAVE
Work preparation
3.2 Subprogram technique
NC programming
500 Programming Manual, 12/2019, 6FC5398-2EP40-0BA0