From 0d77f775bf71b430c9657d27efd640e249c879f7 Mon Sep 17 00:00:00 2001 From: Mark Date: Fri, 24 Jan 2020 20:21:21 +0000 Subject: [PATCH] Minor English fixes. I deleted mention of Java on line 17 because Java compares values using `obj1.equals(obj2)` with `==` comparing addresses, but my understanding is that D's `==` does what one would expect and compares values. --- basics/controlling-flow.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/basics/controlling-flow.md b/basics/controlling-flow.md index 4c42f1f..f0e6bac 100644 --- a/basics/controlling-flow.md +++ b/basics/controlling-flow.md @@ -1,6 +1,6 @@ # Control flow -An application's flow can be controlled conditionally with `if` and `else` +An application's flow of control can be changed using `if` and `else` statements: if (a == 5) { @@ -14,14 +14,14 @@ statements: When an `if` or `else` block only contains one statement, the braces can be omitted. -D provides the same operators as C/C++ and Java to test +D provides the same operators as C/C++ to test variables for equality or compare them: * `==` and `!=` for testing equality and inequality * `<`, `<=`, `>` and `>=` for testing less than (or equal to) and greater than (or equal to) -For combining multiple conditions, the `||` operator represents -the logical *OR*, and `&&` the logical *AND*. +For combining multiple conditions, the `||` operator is used +for logical *OR*, and `&&` for logical *AND*. D also defines a `switch`..`case` statement which executes one case depending on the value of *one* variable. `switch`