dangling else

English

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

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.
This article is issued from Wiktionary. The text is licensed under Creative Commons - Attribution - Sharealike. Additional terms may apply for the media files.