|
-
June 1st, 1999, 12:12 PM
#1
Going into another function from one function
I need to jump into the body of a function from another function. How can I make it?. Pls help me as it is very essential to me.
Ravi Sangisetti
Sr.Software Engineer
Contech India Ltd
Gandinagar, India
-
June 1st, 1999, 12:30 PM
#2
Re: Going into another function from one function
jumping into the body of another function does not sound like something very nice to do, is it possible to structure the function you want to "jump into" into smaller functions and then just call the function pieces that you need?
-
June 1st, 1999, 01:08 PM
#3
Re: Going into another function from one function
Thanks for your suggestion. But let me make the problem clear.
1. In a function
RunFunction()
{
DTL_WRITE(int x, 1000)
//some thing to execute after above instru
...
...
}
This DTL_WRITE is a function given by a particular software. It should perform this operation with in one second. But some times it is getting hanged for infinite time. As the function is supplied by another vendor, we can not do any thing in that.
So I am using a timer Event for checking whether this function was over by 1 second or not. If not I want to execute the instruction next to DTL_WRITE. But as it is hanged there, it is not possible.
So Though I want to maintain structural model, this peccular situation put me in dilema. Pls help me.
Ravi Sangisetti
Sr.Software Engineer
Contech India Ltd
Gandinagar, India
-
June 1st, 1999, 03:59 PM
#4
Re: Going into another function from one function
RunFunction()
{
DTL_WRITE(int x, 1000);
NewFunction();
}
FuncCalledFromTimerEvent
{
NewFunction();
}
NewFunction()
{
// some thing to execute after above instru
}
was what I was getting at - is this app multi-threaded, or how are you getting timer event messages after DLT_WRITE hangs?
-
June 2nd, 1999, 10:17 AM
#5
Re: Going into another function from one function
Thanks a lot for your suggestion. Yes. I am using multithreading. With Ur suggestion, I could solve that problem.
Thank U very much
Ravi Sangisetti
Sr.Software Engineer
Contech India Ltd
Gandinagar, India
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|