Path: csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!news.swapon.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail From: Keith Thompson Newsgroups: comp.lang.c Subject: Re: Readability part I - code Date: Tue, 12 May 2015 08:26:56 -0700 Organization: None to speak of Lines: 30 Message-ID: <87fv71g6kf.fsf@kst-u.example.com> References: <874mnojjn4.fsf@kst-u.example.com> <5551dd30.929578@news.xs4all.nl> Mime-Version: 1.0 Content-Type: text/plain Injection-Info: mx02.eternal-september.org; posting-host="9be37d943435275679235b07c7947eef"; logging-data="26823"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX198sm+JaFkpaeHt7wERZuKa" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) Cancel-Lock: sha1:p1fz2+76cl0cUv/hEAkJeIzuHNk= sha1:FzVXzjln4wUUDJBWg8j1Eu0YFLw= Xref: csiph.com comp.lang.c:61904 raltbos@xs4all.nl (Richard Bos) writes: > Richard Heathfield wrote: >> Invariably? Take Pascal, for instance, which uses BEGIN and END in the >> same way that C uses { and }. Do you write: >> >> IF foo THEN BEGIN >> bar ; >> baz ; >> quux >> END > > Yes. > > And the fact that you are _not allowed_ (not merely not required, but > actually disallowed) to add that last ; bugs me enormously. Actually a semicolon *is* allowed before an END. It's not allowed before an ELSE. (One could argue that that's worse than simply not allowing a semicolon before either END or ELSE.) In Pascal, the semicolon is a statement separator, not a statement terminator. Before an END, it separates the previous statement from an emtpy statement. Before an ELSE, it creates two statements where only one is allowed. -- Keith Thompson (The_Other_Keith) kst-u@mib.org Working, but not speaking, for JetHead Development, Inc. "We must do something. This is something. Therefore, we must do this." -- Antony Jay and Jonathan Lynn, "Yes Minister"