Skip to content

Commit f1f0dcd

Browse files
committed
Changed the formatting of the pre tags in chapter 6. The content wasn't changed in any way, but I made the code look a little cleaner.
1 parent d5f94ab commit f1f0dcd

File tree

1 file changed

+12
-8
lines changed

1 file changed

+12
-8
lines changed

source/ch_6_loopsanditeration.ptx

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -42,20 +42,24 @@ public class DefiniteLoopExample {
4242
Recall that the <c>range</c> function provides you with a wide variety of options for controlling the value of the loop variable.
4343
</p>
4444

45-
<pre>range(stop)
46-
range(start,stop)
47-
range(start,stop,step)</pre>
45+
<pre>
46+
range(stop)
47+
range(start,stop)
48+
range(start,stop,step)
49+
</pre>
4850

4951
<p>
5052
The Java <c>for</c> loop is really analogous to the last option giving you explicit control over the starting, stopping, and stepping in the three clauses inside the parenthesis.
5153
You can think of it this way:
5254
</p>
5355

54-
<pre>for (start clause; stop clause; step clause) {
55-
statement1
56-
statement2
57-
...
58-
}</pre>
56+
<pre>
57+
for (start clause; stop clause; step clause) {
58+
statement1
59+
statement2
60+
...
61+
}
62+
</pre>
5963

6064
<p>
6165
If you want to start at 100, stop at 0 and count backward by 5, the Python loop would be written as:

0 commit comments

Comments
 (0)