All you have to do when programming with goto is to keep it in a respectable manner. Don't have code like:
label1: printf("This is label1\n");
label2: printf("This is label2\n");...
Type: Posts; User: Garfield
All you have to do when programming with goto is to keep it in a respectable manner. Don't have code like:
label1: printf("This is label1\n");
label2: printf("This is label2\n");...
Yes, I'd say a limit of 3 goto's in one source (.c) file.
Why not? If you have a line like this:
...code...
goto label;
...code...
And you absolutely can't find the "label", then there is a nice function to search for a word through source. Not...
I don't think there is anything wrong with goto. I use it just as I would with any other code. I find it quite convenient. It is an easy way to 'jump'.
--Garfield