summaryrefslogtreecommitdiffhomepage
path: root/d.html.markdown
diff options
context:
space:
mode:
authorAndre Polykanine A.K.A. Menelion Elensúlë <andre@oire.org>2015-11-26 22:42:14 +0200
committerAndre Polykanine A.K.A. Menelion Elensúlë <andre@oire.org>2015-11-26 22:42:14 +0200
commitbd52d4e7d5c03cb86bab9098ba67eb2bf84f47ec (patch)
treeabc0c8b305b4474b3e69482ffabd9d3ee32a12f3 /d.html.markdown
parent2d67c58d7f4ea457e756e0973bba0c25a499957e (diff)
parent1391eed837546e442eeaa48bfae9504b999b8c58 (diff)
Merge pull request #2016 from dellis23/master
[d/en] Fix variable name typo in dlang examples.
Diffstat (limited to 'd.html.markdown')
-rw-r--r--d.html.markdown8
1 files changed, 4 insertions, 4 deletions
diff --git a/d.html.markdown b/d.html.markdown
index 6f3710ab..9ebba385 100644
--- a/d.html.markdown
+++ b/d.html.markdown
@@ -53,15 +53,15 @@ void main() {
// For and while are nice, but in D-land we prefer 'foreach' loops.
// The '..' creates a continuous range, including the first value
// but excluding the last.
- foreach(i; 1..1_000_000) {
+ foreach(n; 1..1_000_000) {
if(n % 2 == 0)
- writeln(i);
+ writeln(n);
}
// There's also 'foreach_reverse' when you want to loop backwards.
- foreach_reverse(i; 1..int.max) {
+ foreach_reverse(n; 1..int.max) {
if(n % 2 == 1) {
- writeln(i);
+ writeln(n);
} else {
writeln("No!");
}