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 |
write a vb script to display the code "vbscripting" alphabet by alphabet(i e 1st v then b and up to g)
How will you convert a given number to long in vbscript?
If else for do while select in vb script?
Write a program to create a Dynamic array of size 5 elements and display all the elements.
write a vb script to find simple interest using functions
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.....
What are the 2 ways to pass a value to the function?
How will you trim the spaces on the left of a string using vbscript?
What is vbscript language used for and which earlier language is it modeled upon?
What is the equivalent of VBScript?s On Error In Jscript ?
how to genarate a random numbers in vb?
My Salary is 65000. How Much TDS I have to pay