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 |
Which operator can be used to change the value of the operand or change the state of the condition?
How will you get the exponent of the given number in vbscript?
I want good books or good sites for scripting.Can any one help me.
How to use Text file (Notepad) as ur data source in QTP? Can u please provide some function code for it?
How to open browser in vb script?
can anyone send me a vb scripts code for clicking on a link and coming back on home page again does the same for many links on a web page.
Explain about scrrun.dll in vbscript?
How to assign a numeric value to a variable?
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 will you get the natural logarithm of the given number in vbscript?
how to organize files in object repository of qtp
If anyone knows abt Test Complete material, Pls let me Know. if u have any material or any documents..... Pls mail me on this mail Id...... This is very Urgent Requirment..... for my Project.....