What is difference between function and procedure?
Answer Posted / anurag arun edlabadkar
Question: Difference Between Procedure &
Function?
1). Both functions and procedures can return values.
2). Both can return multiple values, like in the case of
procedure it can return multiple values using OUT and INOUT
type parameter, while in case of function used in Report 6i,
using "PLACEHOLDER COLUMN" you can return multiple values.
3). "Complete Reference" Book say that function can use
parameters as IN, OUT, and INOUT as same as in Procedure.
/*
create function syntax
The syntax for the create function command is more
complicated than the syntax for the create procedure
command. At a high level, the syntax is
create [or replace] function [schema.] function
[(argument [in | out | inout ] [nocopy] datatype
[, argument [in | out | inout ] [nocopy]
datatype]...
)]
return datatype
*/
4). Function returns value using "Return" Key Word, where
same key word can be used in Procedure to Terminate the
program, with immidiate effect.
5). Functions are used for computations where as procedures
can be used for performing business logic.
6). Functions MUST Return a value, procedures need not be.
7). You can have DML(insert,update, delete) statements in a
function.
8). You can call a function in a Select Query where as
not Procedure.
9). Function returns 1 value only where as Procedure can
return
multiple values(max. 1024)
10). A procedure may modifiy an object where a function can
only return a value.
| Is This Answer Correct ? | 20 Yes | 7 No |
Post New Answer View All Answers
Explain how to use QTP to check broken links on a page?
What is object spy in quicktest professional (qtp)?
how to i add the values using the check points property?( i.e valid data(for valid data it's giving the footer message:value is added) and for invalid data: special chars, spaces,Duplicates and null values (in my page when ever we enter special chars, spaces and null values, it's giving the proper warning message and for Duplicates it's giving the footer message:"value already exists)?
we use a file extension .properties why is it used and where do we use it plz help me out with detailed explanation and navigation of how to use on the QTP 8.2?
any body plz send health care domain project to me with explanation any two modules on that project. mail_id: ranjith_99reddy@yahoo.co.in
what are the mandatory properties for a tex boxc (scenario?)
What is the parameterization? Give one example?
can anyone tell me from where i can download qtp demo or crack version
What is Distributed testing? How does UFT support it?
When do go for loop condition in test?
How many ways is to parameterize the value?
Explain the types of object repositorys in qtp?
What is recovery scenario manager? When you go for recovery scenario manager? Tell me one scenario were your used recovery scenario in your project?
How to get Traceability matrix from TD?
How does quicktest professional identifies the object in the application?