joel@decwrl.DEC.COM (Joel McCormack) (07/24/86)
I knew sooner or later someone was going to complain about using GOTO in Pascal. Pascal is severely handicapped by the non-definition of boolean expression evaluation, as well as the lack of a general loop construct. I used to use dummy boolean variables to get around these problems. After programming in Modula-2 awhile, I decided that the dummy booleans obscured the code more that a simple GOTO did. In any case, Niklaus has defined Modula-2, so I consider discussions like this moot. If you want to complain, at least complain about what Modula-2 can't do; discussions of Pascal's problems are out of date. -- - Joel McCormack {ihnp4 decvax ucbvax allegra}!decwrl!joel joel@decwrl.arpa
hedrick@topaz.RUTGERS.EDU (Charles Hedrick) (07/24/86)
I have no objection to a single GOTO to exit a loop. I do object to for ... if ... goto 111 foo; goto 222; 111: bar; 222: That's getting too much like spaghetti.
marty@ism780c.UUCP (Marty Smith) (07/28/86)
In article <5411@topaz.RUTGERS.EDU> hedrick@topaz.RUTGERS.EDU (Charles Hedrick) writes: >I have no objection to a single GOTO to exit a loop. I do object to > for ... > if ... > goto 111 > foo; > goto 222; >111: > bar; >222: > That's getting too much like spaghetti. > Of course the above looks like spaghetti. It has no meaning. Its purpose is to show how bad gotos are. Any program can be written poorly. The fault lies with the programmer, not in his use of gotos. Martin Smith