Bob Ammerman wrote: >> > In a final note, if I ever did use a GOTO in C, it would probably >> > be only a *local* GOTO used within a subroutine, and not as part >> > of the overall control structure of the program - which would no >> > doubt lead to spaghetti code [like I used to write in Basic when >> > I first learned to program]. In this case, using a GOTO to "speed >> > up" a bit of code would be acceptable. >> .............. >All ANSI 'C' compilers must allow gotos within a function, even _into_ such >structures as while and for loops and switch statements. > >No 'C' compiler should allow gotos from one function to another. I'd love to >here the story of any which does. > I guess I didn't make my point very clearly. What I said was I personally would not use GOTOs "as part of the overall control structure of the program" [meaning at the highest-most decision- making levels], but *possibly* would use them in some "low-level" routines that perform certain specific and limited operations. For overall program flow control, there are certainly much better choices - primarily, switch-case. As someone else noted, this is basically a structured form of a computed-goto that has the distinct advantage of limiting the number of directions to which you can jump. - danM -- http://www.piclist.com#nomail Going offline? Don't AutoReply us! use mailto:listserv@mitvma.mit.edu?body=SET%20PICList%20DIGEST