Hi all!
Well programmers are unanimous when it comes to use the goto keyword: everybody aggrees it's a bad idea to use it AT ALL.
Is that really true? For example, this code:
Works well on most compilers, but I find theCode:int main() { for( ; ; ) { RoutineA(); RoutineB(); RoutineC(); } }
a more cross-platform aproach (when compiling the same code in different compilers, for example. Note that the for statement, when used without parameters, is not accepted in every compiler).Code:int main() { MyRoutines: RoutineA(); RoutineB(); RoutineC(); goto MyRoutines; }
Well is goto a REALLY bad idea as many people say?
Is there any author in related literature who mentions this subject satisfactory?
What are the cases I could precisely use it?