Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
What are different types of Function we define in UFT?
#1
Not Solved
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
Reply
#2
Not Solved
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.
Thanks,
SUpputuri
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
Smile How to join sub strings in UFT without using join built-in function? chetna 1 1,914 07-05-2018, 05:39 PM
Last Post: Ankur
  Calling a Function in Function Library when function is defined in an Action jitenderkkr 0 2,967 11-27-2014, 12:53 PM
Last Post: jitenderkkr
  Using DP to define windows mrerek 6 5,883 07-21-2011, 12:44 AM
Last Post: mrerek
  How can I fetch server time using function Now or any other function? blanchedsouza 2 5,104 11-07-2009, 08:34 PM
Last Post: Ankur

Forum Jump:


Users browsing this thread: 1 Guest(s)