Last post Oct 29, 2013 10:53 PM by Paul Linton
Oct 29, 2013 06:58 AM|damon2012|LINK
I have a recursive method that calls itself. After its got to the end of the method, the stack is unwinding itself and going back to where the recursive call was made. The problem is that there is some code under the call that I only really want executing
once so when it goes back I dont want this. Is there a way to call the method and not have the program go back to the calling method later? Hope I explained this ok,
In other words can you prevent the program returning to the calling method?
Oct 29, 2013 07:54 AM|Siva Krishna Macha|LINK
We would need to use the return statement along with some decision branch (if/else or switch etc).
Please refer the following article:
Please mark this as answer if this answers your question.
Oct 29, 2013 10:53 PM|Paul Linton|LINK
other words can you prevent the program returning to the calling method?
Well, actually you could but it depends ...
If you show some code and explain the problem we can help you.