Some languages provide run time support to check compatibility between arguments and corresponding procedure parameter specifications (number, type, kind, etc). Does Java need this?
Most modern languages do not require this because nearly all
checking can be done once only at compile time. FORTRAN needs
runtime checking above because subroutines can be compiled
separately but routine checking is rarely done because of
efficiency reasons.
Since there are never more procedure declarations than there
are procedure calls in the source program, shortening the call
at the expense of the procedure body will lead to a smaller
object program.
Many new computers/microprocessors have hardware facilities which help catch these errors.
Most computers will have error traps (like interrupts or Exceptions)
which are caused by division by 0, integer and floating overflow.
Runtime support can catch these errors and report to user.
Since an enumerated type has an ord value = integer ranging
from 0->MAXSIZE,it would be necessary to check if<0 or>MAXSIZE,
BUT this can be done at compile time. Subranges are different
since if:
i:0..150
then i12 )checked i
j ) run time check
i200 )at compile input(i) ) needed
time j is integer and is only legal
if 0 < j < 150 .