Re: Dangling else

Karsten Nyblad <>
15 Mar 2006 22:09:42 -0500

          From comp.compilers

Related articles
[9 earlier articles]
Re: Dangling else (Dave Thompson) (2006-03-05)
Re: Dangling else (Dmitry A. Kazakov) (2006-03-06)
Re: Dangling else (Russ Cox) (2006-03-06)
Re: Dangling else (Marco van de Voort) (2006-03-11)
Re: Dangling else (Brian Inglis) (2006-03-11)
Re: Dangling else (2006-03-14)
Re: Dangling else (Karsten Nyblad) (2006-03-15)
Re: Dangling else (Hans-Peter Diettrich) (2006-03-15)
Re: Dangling else (Marco van de Voort) (2006-03-15)
Re: Dangling else (2006-03-16)
| List of all articles for this month |

From: Karsten Nyblad <>
Newsgroups: comp.compilers
Date: 15 Mar 2006 22:09:42 -0500
Organization: Compilers Central
References: 06-02-154 06-02-168 06-03-008 06-03-023
Keywords: syntax
Posted-Date: 15 Mar 2006 22:09:42 EST

Marco van de Voort wrote:
> On 2006-03-05, Henry Spencer <> wrote:
>>Bear in mind, though, that attempts to reduce the number of levels have
>>often been found equally unsatisfactory. Pascal tried, and the result was
>>counterintuitive cases where certain parentheses, which everyone agrees
>>ought to be redundant, are in fact necessary.
> Could you give examples here? Are you refering to the experimental
> notations for exponentiation 2^(-1) in some dialects ?

Other people have already written about having to write (A<B) AND (C>D)
to get what in normal mathematical notation would written A<B AND C>D.
In pascal you can also apply the relation operators to the boolean
values. Thus the "implies" operator can be written as <= in Pascal.
Assume A and B are integer variables and C and D are boolean variables.
    Then (A<B) AND C <= D is valid Pascal, but try figuring out what it means.

Karsten Nyblad
148f3wg02 at sneakemail dot com

Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.