Micro Focus QTP (UFT) Forums

Full Version: What are different types of Function we define in UFT?
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hello,

In UFT we define Functions as below

Public Function Fun()

End Function

Function Fun()

End Function

Sub Fun()

End Sub

What is basic difference between these?


Regards
Amit
there is no difference between 1 &2, as when ever you don't specify the Access attribute (Public,Private) then QTP will consider the function as public.
3 one is a sub.
The difference between a function and sub is, function returns value where as sub can not.