Micro Focus QTP (UFT) Forums
What are different types of Function we define in UFT? - Printable Version

+- Micro Focus QTP (UFT) Forums (https://www.learnqtp.com/forums)
+-- Forum: Micro Focus UFT (earlier known as QTP) (https://www.learnqtp.com/forums/Forum-Micro-Focus-UFT-earlier-known-as-QTP)
+--- Forum: VB Scripting/Descriptive Programming (https://www.learnqtp.com/forums/Forum-VB-Scripting-Descriptive-Programming)
+--- Thread: What are different types of Function we define in UFT? (/Thread-What-are-different-types-of-Function-we-define-in-UFT)



What are different types of Function we define in UFT? - amit25007 - 01-27-2016

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


RE: What are different types of Function we define in UFT? - supputuri - 03-09-2016

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.