QTP,VBScript, Public Function -
i want know difference between "public function" , "function"
if can , , highly appreciated..
thanks
in addition answer of ekkehard.horner, in qtp possible load qtp function libraries (qfl) .qfl or .vbs files.
a function
, const
or variable
in qfl private, can not used in qfl, module or action, while public 1 can.
functions, constants , variables default public:
' public: dim myvariable public myothervariable const pi = 3.1415 function gethello gethello = "hello" end function sub sayhello msgbox gethello end sub ' private: private myprivates private const hello = "hello!" private function gethellotoo gethellotoo = hello end function private sub sayhellotoo msgbox gethellotoo end sub class dog public function bark print "bark! bark! bark!" end function end class
yes, classes private in module. have return function make them public available:
' placed in same module class dog public function givemeadog set givemeadog = new dog end function
Comments
Post a Comment