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 is the bset training centre to learn automation tools?
What are the 2 ways in which a variable can be declared in the vbscript language?
Write a function for Instr(). We need to write a function that works as same as Instr(). Code or Even pseudo code is good enough for me.?
Mention what if you do not specify anything when you call a procedure?
Explain the extension .hta?
Plz give the vb script for the following scenerio. In travel booking we have to select from delhi to mumbai from the combobox The prices will be display in another combo box .But i have to select the lowest price for it and submit it
What is the event handling in vbscript?
if u ve resrevation for train and u get a number supose 1234xxxokie.after sucessul entering all required fields. now u put that number in search and want to chk wether these ar same or not if both ar same then its okie otherwise test fail.what would be the vb script code for it to compare these two values of different page.
Is it possible to pass optional argument to function in vb script?
What is the purpose of regexp object in vbscript?
Explain vbscript in detail?
how to add the shared repository file to the script file while running the script manuall