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 |
What is parameter in qtp?
What is Expert view?
When we r doing data driven test with chkpts, i want to insert formulae in data sheet but i didn't get. How we wil do that plz. explain in detail.
How to database testing by manualy?in my db having 100 records when i am retriving the data from db it shows in frent end 30 records how to find bug using QTP?plz Exp realtimers (Chandana)
Hi, i have a string like "INDIA". I need to display this string vertically in Msgbox?
Hi I have exp in manual testing and planning to move in automation testing qtp(9.2).So can help me how to automate customer relationship management tool using qtp and vb script this tool already developed so how can I test it whatever maintaining by development team like documents,various options just give the whole life cycle thanks in advance
Is there any relation between Keyword Driven Framework and Recording modes provided in QTP( whether Recording modes are applied on keyword driven framework or not?)
Hi All, How to Compare two strings character by character in QTP
Describe function procedure in vbscript.
What are software testing metrics
How to take screenshots in qtp?
When we use Object Spy? can we write QTP script before built is came in testing?