07-12-2011, 09:18 PM
In a Sub, should we be able to:
Fax(rNum, C)
or
Fax(rNum, 1)
or do I need to use a Function?
Fax(rNum, C)
or
Fax(rNum, 1)
or do I need to use a Function?
Sub or Function
|
07-12-2011, 09:18 PM
In a Sub, should we be able to:
Fax(rNum, C) or Fax(rNum, 1) or do I need to use a Function?
You can do everything in a sub that you could in a function EXCEPT that you cant return anything back.
In your examples, If C is a variable, it works for both function and sub and i think neither function nor sub will work if you put some constant like '1' in arguments list which is absolutely of no use.
07-12-2011, 10:30 PM
Raj,
Thx again for your help. For whatever reason, Fax(rNum, 1) will work as a Function but not as a Sub. passing anything back, but in a Sub, I keeping getting messages not wanting me to use ( ). But my call works Ok as a Function. For me, Fax(rNum, 1) or Fax(rNum, 0) works great. If my function gets a 0 then it runs all of the negvative tests. Since I only want these testzs run one time, when a 1 is passed, the negative tests qarec skipped. This saves a ton of execution time. thx for reading.
hmmm, may be but better coding standard is to use variable name
Code: Function Fax(rNum,runStatus)
07-13-2011, 01:05 AM
I dont have gtalk. Sorry, but im scared of giving out my email address. I had a guy that started harassing me and the stalking me. To scary... sorry.
|
« Next Oldest | Next Newest »
|
Possibly Related Threads… | |||||
Thread | Author | Replies | Views | Last Post | |
Calling a function in a Test Script from a function library | anupam4j | 3 | 6,113 |
06-26-2015, 12:31 AM Last Post: babu123 |