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
How to connect the remote desktop using QTP 9.2 explain the method or procedure?
Some time when i wanna learn the object i face issue like i am not able learn the object in proper manner... eg:for text bo on web page it should learn as webedit but some times it reads as winobject:internetexpoler-server, because of this i have to uninstall the qtp and re-install it again when i do this it reads the object perfectly.....plz suggest the soln
i have asked earlier only one question how to test web application using QTp plz send me the answer quickly
How to use actions in qtp ?
please any one can explain the keyword driven framework. with gmail example.
Hi Friends, Can anyone help me out in this one? In QTP, I am using Data Driver and want to parameterise multiple values (say 3 values ) for a field. How can I do it using Data Driver wizard? Plz mention it step-by-step. In the end after doing the needful, on opening the Data Driver window, how can I get number (i.e. 3) in the Parameterised column for that particualr value? Thanks a lot in advance.
what is keyword driven testing in qtp?n how is it useful?
What are the different types of recording modes in qtp? Which will be used when?
what is clean sweep?
Give the syntax to import/export xls into qtp.
What is the difference between qtp and selenium?
can any one say that where we can download the QTP trail version ??????????
Explain the features of quick test pro(qtp)?
Where we use data driver in qtp?
Explain how qtp identifies objects?