Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions source/statements.tex
Original file line number Diff line number Diff line change
Expand Up @@ -558,7 +558,11 @@

\pnum
\indextext{statement!declaration in \tcode{while}}%
A \keyword{while} statement is equivalent to
A \keyword{while} statement
\begin{ncsimplebnf}
\keyword{while} \terminal{(} condition \terminal{)} statement
\end{ncsimplebnf}
is equivalent to
\begin{ncsimplebnf}
\exposid{label} \terminal{:}\br
\terminal{\{}\br
Expand All @@ -569,8 +573,8 @@
\terminal{\}}
\end{ncsimplebnf}
\begin{note}
The variable created in the condition is destroyed and created with each
iteration of the loop.
The variable created in the \grammarterm{condition}
is destroyed and created with each iteration of the loop.
\begin{example}
\begin{codeblock}
struct A {
Expand All @@ -586,8 +590,8 @@
}
\end{codeblock}
In the while-loop, the constructor and destructor are each called twice,
once for the condition that succeeds and once for the condition that
fails.
once for the \grammarterm{condition} that succeeds and
once for the \grammarterm{condition} that fails.
\end{example}
\end{note}

Expand Down