what is the difference between function and subroutine
....here every one knows theoretically...here my QUESTION IS
WHAT IS THE MEANING OF FUNCTION CAN RETURN A VALUE AND SUB
CAN NOT RETURN A VALUE .....WHAT DOE'S IT MEAN FUNCTION CAN
RETURN A VALUE HOW FUNCTION CAN AND SUB CAN'T ....GIVE A
EXAMPLE FOR BOTH ....HOW IT CAN AND CAN NOT...HELP ANDY ONE....
Answer / denis parker
Function - can return value (but not must) to the calling script
Function with argument and not return value
x = "10"
y = "12"
Call Addition_1(x, y)
Function Addition_1(x, y)
msgbox (x&y)
End Function
Function without argument and not return value
Call Addition_2()
Function Addition_2()
x = "10"
y = "12"
msgbox (x&y)
End Function
Function with argument and return value
x = "10"
y = "12"
z = Addition_1(x, y)
Msgbox z
Function Addition_1(x, y)
Addition_1 = (x&y)
End Function
Function without argument and return value
z = Addition_1()
Msgbox z
Function Addition_1()
x = "10"
y = "12"
Addition_1 = (x&y)
End Function
Subroutine - cannot return value to the calling script
Subroutine with argument and not return value
x = "10"
y = "12"
Call Addition_1(x, y)
Sub Addition_1(x, y)
msgbox (x&y)
End Sub
Subroutine without argument and not return value
Call Addition_2()
Sub Addition_2()
x = "10"
y = "12"
msgbox (x&y)
End Sub
| Is This Answer Correct ? | 1 Yes | 0 No |
IF I SET THE VIRTUAL OBJECT AFTER THAT MAXIMIZE THE APPLICATION THEN QTP SENT ERROR OR EXECUTE SUCCESSFULLY? WHY ?
what is selective recording ? and normal recording?
What is the syntax to call one action in another?
For example you are checking bit map check point before coming to the results. How can you say it is passed? Or failed? Anyways?
How vl i prioritize the actions when i have 10 actions A1, A2, A3......A10. I want to run action as follows A1,A5,A6 and A10. How i can do it. Thanks in Advance to u.
What is the difference between "Call to copy of action", "Call to existing action" & "Call to winrunner action"?
How reliable are the site's Internet connections required to be? And how does that affect backup system or redundant connection requirements and testing?
What is the difference in testing a client-server application and a web application?
Can anyone tell me about "Step- By Step Paramterization". among the two paramaterizations, Step by step and Parameterize All, which one is mostly used.
what are the difference between qtp8.2 to 9.0 surya
In an application you have a web table. You are provided with an external Excel sheet with the same structure as that of the web table. How will you retrieve all data from the web table and compare it with corresponding data available in the excel sheet, using QTP? How will you report the results in QTP?
This is a question thats generally asked in every QTP interview. What were the problems that you faced during automation and how did you resolve them?