Alors si tu veux voir des beaux goto, jetes un coup d'oeil sur le source de
procmail. Sauf erreur de ma part, il y a des "beaux" dans lmtp.c.  8-)


dieu a dit:
C has a goto statement and labels, so you can branch about the way you used to. But most of the time goto's aren't needed. (How many have we used up to this point?) The code can almost always be more clearly expressed by for/while, if/ else, and compound statements.

http://www.lysator.liu.se/c/bwk-tutor.html
ch 27

les deux examples qu'il donne sont:
<--->
One use of goto's with some legitimacy is in a program which contains a long loop, where a while(1) would be too extended. Then you might write

          mainloop:
               ...
               goto mainloop;
Another use is to implement a break out of more than one level of for or while. goto's can only branch to labels within the same function.
<--->

et on est clairement pas dans ce cas la....

_______________________________________________
Solaris_fr liste de diffusion en français pour Solaris, sur toutes architectures
[email protected]
http://x86.sun.com/mailman/listinfo/solaris_fr

Répondre à