Special sub program unit declaration called forward declaration, Consider below the example
In this pacakage, the first program unit is calling the calc_rating but calc_rating is defined last in the package.
if we are not declared the fwd declaration then it will raise the error While compiling this package. Package
compilation always happens top to bottom. For resolving this compilation issue, you should declare the fwd
declaration.
CREATE OR REPLACE PACKAGE BODY forward_pack
IS
PROCEDURE calc_rating(. . .); -- forward
declaration
PROCEDURE award_bonus(. . .)
IS -- subprograms
defined
BEGIN -- in alphabetical
order
calc_rating(. . .);
. . .
END;
and
PROCEDURE calc_rating(. . .)
IS
BEGIN
. . .
END;
END forward_pack;