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 will you format a number in percetage format in vbscript?
How to remove the spaces in a string Ex: "this is apple"
Explain different types of segment?
Could Anybody tell me VBScript for Check if a given number is Prime number-Don't use any Built- in Functions Boolean/int is Prime(int number).. Thanks in advance.
which one is more secure vb script or java script ??????? or both are same ??????
Explain about the functionality of vb script?
How to assign a date value to a variable?
What are the different types of operators and their order of precedence?
How will you get a subset of a array in vbscript?
write a Vb script to find a whther a selected drive exits.
Explain about adodb.stream class?
what does create object actually do when you call it in vbscript?