what is mean by forward declaration and where we'll use it.

Answer Posted / venkat

A forward declaration looks like the package definition
part but is inside the bode.

e.g.

procedure A is
begin
B;
end A;

procedure B is
begin
null;
end B;

will not work, because during call to B B is still unknown
(1 Step compiler) therefore we need a forward declaration:

procedure B;

procedure A is
begin
B;
end A;

procedure B is
begin
null;
end B;


now we can compile

Is This Answer Correct ?    30 Yes 2 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

How do you get column names only for a table (sql server)?

659


Can a procedure in a package be overloaded?

540


How many scalar data types are supported in pl/sql?

517


What are sql commands?

496


Explain the the delete statements in sql?

573






What are properties of the transaction?

552


What is trigger in sql?

574


What are the two types of exceptions.

629


What is the difference between sql and t sql?

531


What is the plv (pl/vision) package offers?

605


What is sql procedures and functions?

524


What does rownum mean in sql?

547


What is date functions?

567


What is the difference between database trigger and stored procedure?

548


Why we use join in sql?

523