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 |
Diff. between keyword driven Data driven testing?
what are the Tools for version control?
Explain the check points in quicktest professional (qtp)?
In a QTP project lets say there are 100+ function library and incorrectly we have duplicate some function in multiple libraries. How to find those duplicate functions and remove them?
Among the 3 Recoring modes,Standard, Analog and Low Level. which one is mostly used. I know that Analog id used for Graphs, Digital Signatures and Barcoding. so, which one among the 2?
What is difference between QC and TD?
what is vmodel?advantages and disadvantages of vmodel?
Hi, Can anyone tell me what type questions can be ashed in interview on QTP?
What is the best institute in Ameerpet? If people think Ameerpet is the pride of hyd they need to go to Delhi/Gurgaon/noida you can find the difference.
Hello Everyone, In QTP we have one option Data Driver wizard that comes in Tools -> Data Driver. so, please tell me abtout the use of Add Value and Parameterize options available in Data Driver wizard. And also the concept of value, constants, Parameterized displayed in the wizard. Please explain by giving the example. Thanks in advance, Gaytri
where the check points are stored ?
How to add a standard checkpoint in your test ?