Jump to content

dangling else

From Wiktionary, the free dictionary

English

[edit]
Examples

if a then if b then s else s2

In this example, the compiler can’t know whether else s2 should apply to if b or to if a.

Noun

[edit]

dangling else (plural dangling elses)

  1. (programming) A potential ambiguity in a programming language that occurs when an else clause can be associated with either a nested conditional or with the clause that encloses the nested conditional.