I am working on a script. The script includes some functions. Every function has one url packet that query the server. The server returns the data in JSON format. To use this data I have included the JSON library.
The problem I am facing is each function calls the next function after it finishes executing its body.
Like:
When Function1 Finishes it calls function2
when Function2 Finishes it calls Function3...and so on
So in-between if one of the function fails the script stops executing further.
I have research about this on Google and found out that i have to implement a circular buffer but couldn't find any good example of it.
One of my friend pointed out me that call functions recursively is very bad idea. Is that right?