Saturday, November 28, 2009

What is Function Overloading?

Two or more procedures or functions are called overloaded when
a) They have the same names
b) Different no of formal parameters defined
c) Formal parameters differ in their datatypes/Subtypes and not in the same family
d) They belong to same subprogram/package/PL SQL Block

They are not overloaded when
a) Any of the above points are not satisfied
b) RETURN datatype alone differs and not the formal parameters

The main purpose of overloading procedures is that when a PL SQL block is found to do a same operation with different inputs we names them same and feed different parameters

2 comments:

  1. This post describe very important topic of programming that is function overloading. The method is explained in very simple language. I have suggestion for you guys that you can include an example also so for beginners it becomes clearer.
    sap testing tools

    ReplyDelete
  2. This comment has been removed by the author.

    ReplyDelete