11.5. Support for parameter checking.   

Parameter checking suffers in some languages when:
(1) Mutually recursive procedures are used in one-pass compilers.


Solution: Make it two pass or
Forward declarations with all parameters.

(2) Separate compilation of procedures is allowed and compiler doesn't have access to external declarations.

Solution:
(1) Declare the procedures as external again with full
parameter description. CAN still cheat.
(2) Smart linker - NOT ALWAYS POSSIBLE.
(3) Leave summarised declarations lying about which must be
used in compiling all programs using these procedures.
MODULA 2, Java classes.

(3) Compiling a program which allows procedures as parameters which do not have a mechanism for completely describing that procedures parameters. i.e. in Pascal:

procedure fish(i,j:integer; procedure y);
begin
:
y(1,2,3);
:
end;


How does it do the correct checking at compile time?
Type, number, order ..... No way at compile time.

Solution:

runtime checking --> check against information left from
descriptors.
Some compilers require you to specify full parameter specs
of the procedure parameter.

This is only of use in checking legality within fish.