what's the difference in between function and sub and give
some code as well
Answers were Sorted based on User's Feedback
Answer / kamesh
A Function procedure is a series of VBScript statements
enclosed by the Function and End Function statements. A
Function procedure is similar to a Sub procedure, but can
also return a value. A Function procedure can take arguments
a Function procedure has no arguments, its Function
statement must include an empty set of parentheses.
Celsius = (fDegrees - 32) * 5 / 9
A Sub procedure is a series of VBScript statements
(enclosed by Sub and End Sub statements) that perform
actions but don't return a value. A Sub procedure can take
arguments (constants, variables, or expressions that are
passed by a calling procedure). If a Sub procedure has no
arguments, its Sub statement must include an empty set of
temp = InputBox("Please enter the temperature in degrees
MsgBox "The temperature is " & Celsius(temp) & " degrees
|Is This Answer Correct ?||8 Yes||0 No|
Answer / venkatesh
Hello every body,
If you don't know the rite example No issue...
But please don't copy and paste QTP user guide examples..
Humble request for all
|Is This Answer Correct ?||4 Yes||2 No|
Answer / rachel wang
Nothing wrong to post a correct answer in any ways.
Of course 'QTP Online Help' provides the better answer, I
always look up QTP first.
|Is This Answer Correct ?||2 Yes||0 No|
1.Write a CRITICAL test cases for calculator ? 2.What is the difference b/w FRS and SRS documents ? 3.What is Component ? 4.What is object ? 5.what is the difference b/w static and dynamic descriptive programming ?
1. how can you handle exceptions without using recovery scenario?
What is the difference between Datadriven and Parameterization?
what is the use of VIRTUAL OBJECTS? explain ?
How you automate test scripts
Hi, Can any body please tell me how to create framework in qtp & where i can get some material to learn about it. regards, rahulT
If 3 browsers are opened in our system, how to enter the facebook url into second browser by using descriptive programing
How can I use Call dlls in QTP ?
What is the diffrence bettween QTP 9.0 and QTP 9.1?
how do check the links in a webpage ?
How 2check the color of the text in the textfield . say suppose the text entered in the textfield object is appearing in red. so i want to check whether the text is in red color or not. It could be great help for me if any one solve's my issue. plz...help
How Does Run time data (Parameterization) is handled in QTP?