hai..friends ....what is the difference between function and
sub procedure ....here every one know's theoretically here
my question is what is the meaning of function can return
the value and sub can't return the value...can you give one
example with some values for that ....what does it mean ?
how function can return the value...sub can not...any one
please...........with example
Answer / monika
function myfunction(a,b)
myfunction=a+b
End function
returnvalue=myfunction(5,9)
msgbox returnvalue
it will display value returned by function and stored in returnvalue variable as 14
sub myfunction(a,b)
myfunction=a+b
End sub
returnvalue=myfunction(5,9)
msgbox returnvalue
it will throw error as no value returned by sub
sub myfunction(a,b)
c=a+b
msgbox c
End sub
call myfunction(5,9)
it will display 14 inside sub
| Is This Answer Correct ? | 1 Yes | 0 No |
How to check the particular window is exist or not with out using check points
How to access array data?
How to write functions and sub in vb script?
Have any one know about Test Complete 6, please let me know. If any one have good material regarding Test Complete 6, Please send to my mail id: cns.praveen@gmail.com
write a vbscrpit to swap values
Explain what is loose binding? Why is it not a good practice to use it?
what is the code in QTP to take screen shot? Please send me any one to my mail id. my mailid is manu.sanepalli@gmail.com
How to write VB Script for selecting a particular row in a WebTable?
What are the naming conventions while declaring a variable in the vbscript language?
i need to sort the data using qtp script for this how i need to write a qtp script
Create a file system object to do the following i. Create a folder ii. Create a text file in the folder iii. Update text file with some tex
How to return a value from function...? you should not tell msgbox, print.. etc.,