Parameters are two types:
1. Actual or Real Parameters:
1. Actual or Real Parameters:
- Actual parameters (or real parameters) are the arguments which are used to pass real value or data to the procedures. Actual parameters may be variables or constant values.
2. Formal Parameters:
- The variables which are used to specify or declare types of data to passed to the procedures are formal parameters.
For Example:
DECLARE SUB add (x, y)
x=5
y=6
CALL add (x, y)
END
SUB add (m, n)
a=m+n
PRINT a
END SUB
Here, in the example, x and y are actual parameters and m and n are formal parameters.
DECLARE SUB add (x, y)
x=5
y=6
CALL add (x, y)
END
SUB add (m, n)
a=m+n
PRINT a
END SUB
Here, in the example, x and y are actual parameters and m and n are formal parameters.