aboutsummaryrefslogtreecommitdiff
path: root/13_while3.zig
diff options
context:
space:
mode:
authorDave Gauer <dave@ratfactor.com>2021-02-07 11:06:51 -0500
committerDave Gauer <dave@ratfactor.com>2021-02-07 11:06:51 -0500
commitadf5ddb27df7f5a22b0b7d3321dfc8bca1e7937a (patch)
treea25511c3bb20069f1d6123366573c82c5745338b /13_while3.zig
parent507355ec3b1066c707e19816b86ac1fb56fc0385 (diff)
downloadziglings-adf5ddb27df7f5a22b0b7d3321dfc8bca1e7937a.tar.gz
ziglings-adf5ddb27df7f5a22b0b7d3321dfc8bca1e7937a.tar.bz2
ziglings-adf5ddb27df7f5a22b0b7d3321dfc8bca1e7937a.tar.xz
ziglings-adf5ddb27df7f5a22b0b7d3321dfc8bca1e7937a.zip
Consistent instructions and examples
I started off with "hints" that required the poor student to piece together the information from incomplete bits. A complete example is like a picture that is worth 1000 words and far clearer.
Diffstat (limited to '13_while3.zig')
-rw-r--r--13_while3.zig7
1 files changed, 4 insertions, 3 deletions
diff --git a/13_while3.zig b/13_while3.zig
index 55fcc0a..3ff42ff 100644
--- a/13_while3.zig
+++ b/13_while3.zig
@@ -6,12 +6,13 @@
// Example:
//
// while (condition) : (continue expression){
+//
// if(other condition) continue;
-// ...
+//
// }
//
-// The continue expression executes even when 'other condition'
-// is true and the loop is restarted by the 'continue' statement.
+// The "continue expression" executes every time the loop restarts
+// whether the "continue" statement happens or not.
//
const std = @import("std");