https://gcc.gnu.org/g:f7645b25985b86918974390dd5d58382ad628b8f
commit r16-7465-gf7645b25985b86918974390dd5d58382ad628b8f Author: Jose E. Marchesi <[email protected]> Date: Wed Feb 11 23:03:44 2026 +0100 a68: add coding guideline on enquiry clauses Signed-off-by: Jose E. Marchesi <[email protected]> gcc/algol68/ChangeLog * ga68-coding-guidelines.texi (Enquiry clauses): New section. Diff: --- gcc/algol68/ga68-coding-guidelines.texi | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/gcc/algol68/ga68-coding-guidelines.texi b/gcc/algol68/ga68-coding-guidelines.texi index ee68d7ae8536..ef0bcfc4acc4 100644 --- a/gcc/algol68/ga68-coding-guidelines.texi +++ b/gcc/algol68/ga68-coding-guidelines.texi @@ -773,6 +773,7 @@ facilities of the language. @menu * Writing routines:: +* Enquiry clauses:: * Nihils:: @end menu @@ -813,6 +814,31 @@ it may be wise to judiciously pass those non-nearby values as arguments in order that the programmer be aware that non-nearby values are being accessed or possibly altered. +@node Enquiry clauses +@section Enquiry clauses + +@dfn{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 +@code{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: + +@example +@{ The range of `c' is the entire loop clause. @} +while char c = getchar; + c /= char_eof +do + ... use c ... +od +@end example + @node Nihils @section Nihils
