File tree Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Expand file tree Collapse file tree 1 file changed +17
-5
lines changed Original file line number Diff line number Diff line change 595
595
\indextext {statement!\idxcode {do}}
596
596
597
597
\pnum
598
- The expression is contextually converted to \tcode {bool}\iref {conv };
599
- if that conversion is ill-formed, the program is ill-formed.
598
+ In the \keyword {do} statement the substatement is executed repeatedly
599
+ until the value of the \grammarterm {expression} becomes \tcode {false}.
600
+ The test takes place after each execution of the statement.
600
601
601
602
\pnum
602
- In the \keyword {do} statement the substatement is executed repeatedly
603
- until the value of the expression becomes \tcode {false}. The test takes
604
- place after each execution of the statement.
603
+ The \keyword {do} statement
604
+ \begin {ncsimplebnf }
605
+ \keyword {do} statement \keyword {while} \terminal {(} expression \terminal {)} \terminal {;}
606
+ \end {ncsimplebnf }
607
+ is equivalent to
608
+ \begin {ncsimplebnf }
609
+ \exposid {label} \terminal {:}\br
610
+ \terminal {\{ }\br
611
+ \bnfindent \terminal {\{ } statement \terminal {\} }\br
612
+ \bnfindent \keyword {if} \terminal {(} expression \terminal {)} \terminal {\{ }\br
613
+ \bnfindent \bnfindent \keyword {goto} \exposid {label} \terminal {;}\br
614
+ \bnfindent \terminal {\} }\br
615
+ \terminal {\} }
616
+ \end {ncsimplebnf }
605
617
606
618
\rSec 2[stmt.for]{The \tcode {for} statement}%
607
619
\indextext {statement!\idxcode {for}}
You can’t perform that action at this time.
0 commit comments