RE: About GOTO (was RE: fixed windows)

new topic     » goto parent     » topic index » view thread      » older message » newer message

Peter Willems wrote:

>    modularization of code. This is one of the main reasons why
>    N. Wirth omitted goto in Pascal and many languages have followed
>    that omission.

Well, at least in 1976, Pascal had the goto.

I have N. Wirth's excellent book, "Algorithms + Data Structures =
Programs", and in this book, he develops a Pascal subset
compiler/interpreter, and the code uses goto.

Also, it is listed in the Pascal EBNF published in Wirths 1978
book "Pascal User Manual and Report".

Additionally, Wirth wrote another fairly famous
compiler/interpreter, Pascal-S (See Barron's, "Pascal, the
Language and its Implementation"), which also used the goto.

Apparently later Wirth changed his ways, as I can't find mention
of the goto statement in the EBNF for his Modula-2 language
("Programming in Modula-2, 1982 by N. Wirth), or in the EBNF for
his Oberon language ("Compiler Construction", 1996 by N. Wirth).

Note - I'm not anti/pro goto.  I rarely use it myself (in C).

The only time I use it is when the code is clearer with it,
mainly when using an FSM.

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu