Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Function calling a another funtion in functional library
#2
Not Solved
OK. Maybe you are just getting caught in the when to use parenthesis or not issue. If you are assigning a variable with a function return you need them. If you are just calling a function or sub and not returning a value...you don't need them.

Code:
Function func1 ()
   'Call function 2 and pass value and get the return
   returnval = func2("Call func2 and return value")
   msgbox returnval
   'Call function or sub without a return value
   func3 "Call func3"
End Function

Function func2(strd)
  'do something here and return value
  func2 = "func2: " & strd
End function

Function func3(strf)
   'do something but no return value
   msgbox "func3: " & strf
End Function

Hope this helps.
Reply


Messages In This Thread
RE: Function calling a another funtion in functional library - by jsknight1969 - 02-17-2011, 10:41 PM

Possibly Related Threads…
Thread Author Replies Views Last Post
  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
  calling QTP script from one to another krishnas.tester 3 6,726 11-12-2014, 10:32 AM
Last Post: vinod123
  calling stored procedure from Oracle borisk 3 6,446 03-19-2013, 12:41 PM
Last Post: gaveyom
  Function written in Func library is not returning values but works in same script Shwethareddy 5 4,666 02-25-2013, 10:55 AM
Last Post: vinod123
  Function is not calling from subdriver qtpexpert 0 2,063 01-18-2013, 12:25 PM
Last Post: qtpexpert

Forum Jump:


Users browsing this thread: 1 Guest(s)