Mail Archives: djgpp/1998/02/27/18:18:42
Erno Tuomainen wrote in message <34F714DE DOT 5C44F298 AT evitech DOT fi>...
>Ricki Lee King wrote:
>>
>> how do i do this?
>>
>> label;
>> expression;
>> goto label;
You came pretty close thought, you would do it by doing this:
Label: //Notice the colon, not simicolon
<expressions>
goto Label;
>
> Sorry, no answer for your question but...
>
> ...please *do not* use goto command in your programs. It's very bad
>programming style and it makes the program much harder to
>understand/debug. Use functions instead.
Not quite so, for some instances, like at the end of a game when you ask if
you wanna play again, you can't really use a function to go back to the
start of your program, and a while loop is very cumbersome and it doesn't
decrese the redability of the code as long as you use VERY FEW labels/gotos.
>
>
>--
>Erno Tuomainen void hello(void)
>ernomat AT evitech DOT fi while(1) printf("Hello
>Linux!\n");
>http://www.evitech.fi/~ernomat }
Ryan
RDM AT Inlink DOT com
- Raw text -