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 |
How to Import data from a ".xls" file to Data table during Runtime.
How to open a new test using quicktest professional?
What is descriptive Programming in qtp.
Any one please tell me how to create framework in QTP (in detail). Is there any website for reference?
What is the difference between keyword driven frameworkd and Modularisation framework?(Chandana)
How do u write a regular expression for date (dd/mm/yyyy) field?
in qtp 3 sheets is there in data table like global, action1, action2. I want to check the rows and columns in action2. how can check using script?
Explain about import and export files?
which checkpoint we use to validate yahoo login screen window after login with ur id and password in qtp
What are the Features & Benefits of Quick Test Pro ?
What are the different recording modes?
Without QTP (or any Testing tool) can we able to test the GUI part of the Applications. for Example generating the Scripts in Notepad and Executing them Using VB. Is it Possible to do so..