Forum Discussion
6 Replies
- shankar_rCommunity Hero
The question does not make sense, Why you want to call two functions in single line?
- DaniellovesmithContributor
Yes, I know but it is req from the client. In test complete we can import functions from unit 1 to unit 2 and call them , that's easy, Client not statisfied with that. Can we use Onclick event to call two fucntions ? for example in javascript.
- AlexKarasChampion Level 3
Hi,
Still not sure about actual problem and use case that caused it. Can you describe it with more details?
The simple and obvious solution is to create a third function that will call required two ones and call this function. Technically it will be one-liner.
But something tells me that this is not what you are looking for.
(If you are looking for concurrent code execution (like calling different functions from two different threads), then this is not possible in scripting languages.)
- SushantNflOccasional Contributor
Can you be more specific like exactly what you want to do?
Calling multiple functions in a single line makes sense when all the methods return some value and combined output is required for further processing.
If you can provide more details on the question(like the use of methods,need of calling 2 functions in the same line), that will be better.
Thanks,
Sushant
Related Content
Recent Discussions
- 5 hours agojstaehlin
- 22 hours agoAivanitskiy