What is the difference in between function and sub as well as
give some code of both

Answer Posted / mukesh

The main difference is that a Function Returns a value but a
Sub do not

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

If there is a change in the object type eg: A button is changed as link, 1. How to edit that in the shared object repository. 2.What options are available to edit the object within shared object repository other than copy from loca; 3.What would be the effect of the change in Coded Scripts within QTP and Functions stored in .vbs file which are loaded and used in QTP

1299


write a script to verify the image path(src property) of the images which are in web pages.

1799


i have two questions for regular expression :- Q1. I have date pattern eg-29/11/2011 29-11-2011 29.11.2011 Que- if any separator is there between date,month and year pattern should match else it should not match eg- pattern should not match in case of 2911-2011 Q2. let say i have a string and there is a number in between of that string eg.-Amount 30002.234 successfully credited to your account . now i have to match this pattern in such a way that even if decimal is not there pattern should match ,how i will do this using regular expression

1020


How to break the object spy ?

659


How you create new action in qtp?

560






how do u manipulating INI, DLL and / or registry files in support of your test environment? actually what do u mean by INI and DLL or registry files. plzzz its urgent do answer

1442


if mandatory and Assitive propertys are shows same how will u write skript in QTP window

1620


What are the types of object repository in qtp?

562


whare exactly we have to use functions and sub routain

1840


how many maximum number of virtual users we can create?

1565


What is meant by Step generator?what is the use of this? we have 3 steps know there what r all those.? can u all pls give me clear idea of this

1401


what type of framework u r using in ur organization

1643


what is the difference between modular framework & datadriven framework

1591


If you have two monitors one is of 19inch and the 2nd one is of 24inch,if you want to write same QTP script in both the two monitors is there any changes required in the script?

1582


How software tester can use constants and variables in scripts?

1684