diff --git a/Doc/Sd1/statements.xml b/Doc/Sd1/statements.xml index 4cb9374893847794e4c8fbd5e4fc7df713b10368..756a44de0c2b626a3e27a0a682e869510887098e 100644 --- a/Doc/Sd1/statements.xml +++ b/Doc/Sd1/statements.xml @@ -2125,16 +2125,22 @@ Do not copy!</screen></td> <figure xml:id="sd1_fig_loopParamSolutionSyntaxSugar"> <title>Combining increment and termination condition</title> - <programlisting language="java">final int repetitions = scan.nextInt(); + <informaltable border="0"> + <tr> + <td valign="top"><programlisting language="java">System.out.print("Enter repetitions: "); +final int repetitions = scan.nextInt(); int loopCounter = 1; while (loopCounter++ <= repetitions) { System.out.println("Do not copy!"); -}</programlisting> +}</programlisting></td> - <screen>Do not copy! + <td valign="top"><screen>Enter repetitions: 3 +Do not copy! Do not copy! -Do not copy!</screen> +Do not copy!</screen></td> + </tr> + </informaltable> </figure> <figure xml:id="sd1_fig_whileSyntax"> @@ -2315,12 +2321,12 @@ while (i < 5 <co linkends="sd1_callout_whileLoopJustCounting-2" ... }</programlisting></td> - <td><programlisting language="java">{ - int i = 0; <coref linkend="sd1_callout_whileLoopJustCounting-1-co"/> // Block local variable - while (i < 5 <coref linkend="sd1_callout_whileLoopJustCounting-2-co"/>) { - ... - i++; <coref linkend="sd1_callout_whileLoopJustCounting-3-co"/> - } + <td><programlisting language="java">int i = 0; <coref + linkend="sd1_callout_whileLoopJustCounting-1-co"/> + +while (i < 5 <coref linkend="sd1_callout_whileLoopJustCounting-2-co"/>) { + ... + i++; <coref linkend="sd1_callout_whileLoopJustCounting-3-co"/> }</programlisting></td> </tr> </informaltable>