6.2 Enquiry clauses

Enquiry clauses are not just “boolean expressions” with a fancy name. They can be thought as a sort of specialized serial clauses, and as such they can contain any number of declarations and units while being required to always yield a value of mode bool.

Avoid polluting the lexical environment with declarations that are intended to be used exclusively within conditional and loop clauses: use a declaration in the enquiry-clause of the clause instead. This also makes it easier to later refactor code.

Examples:

{ The range of `c' is the entire loop clause. }
while char c = getchar;
      c /= char_eof
do
   ... use c ...
od