Thread View: net.lang.pascal
3 messages
3 total messages
Started by Joel McCormack
Thu, 24 Jul 1986 03:34
Pascal and GOTO statements
Author: Joel McCormack
Date: Thu, 24 Jul 1986 03:34
Date: Thu, 24 Jul 1986 03:34
18 lines
1213 bytes
1213 bytes
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
Re: Pascal and GOTO statements
Author: Charles Hedrick
Date: Thu, 24 Jul 1986 08:37
Date: Thu, 24 Jul 1986 08:37
11 lines
718 bytes
718 bytes
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.
Re: Pascal and GOTO statements
Author: Marty Smith
Date: Mon, 28 Jul 1986 16:39
Date: Mon, 28 Jul 1986 16:39
20 lines
1127 bytes
1127 bytes
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
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads