From feb263aee1c70cb82839bf1b85f0a42e40ca314a Mon Sep 17 00:00:00 2001 From: yulingtianxia Date: Mon, 16 Jun 2014 22:14:27 +0800 Subject: [PATCH 1/2] update advanced operators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除英文 --- source/chapter2/23_Advanced_Operators.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/chapter2/23_Advanced_Operators.md b/source/chapter2/23_Advanced_Operators.md index 49f49f4a..42ca8164 100755 --- a/source/chapter2/23_Advanced_Operators.md +++ b/source/chapter2/23_Advanced_Operators.md @@ -270,11 +270,9 @@ let y = x &/ 0 如果严格地从左计算到右,计算过程会是这样: -- 2 plus 3 equals 5; + - 2 + 3 = 5 -- 5 times 4 equals 20; - 5 * 4 = 20 -- 20 remainder 5 equals 0 - 20 / 5 = 4 余 0 但是正确答案是`4`而不是`0`。优先级高的运算符要先计算,在Swift和C语言中,都是先乘除后加减的。所以,执行完乘法和求余运算才能执行加减运算。 From 0f537441adb33b4e28e2faea7d52b61e6dcd5da1 Mon Sep 17 00:00:00 2001 From: yulingtianxia Date: Mon, 16 Jun 2014 22:14:27 +0800 Subject: [PATCH 2/2] update advanced operators MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 删除英文 --- source/chapter2/23_Advanced_Operators.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/source/chapter2/23_Advanced_Operators.md b/source/chapter2/23_Advanced_Operators.md index 49f49f4a..42ca8164 100755 --- a/source/chapter2/23_Advanced_Operators.md +++ b/source/chapter2/23_Advanced_Operators.md @@ -270,11 +270,9 @@ let y = x &/ 0 如果严格地从左计算到右,计算过程会是这样: -- 2 plus 3 equals 5; + - 2 + 3 = 5 -- 5 times 4 equals 20; - 5 * 4 = 20 -- 20 remainder 5 equals 0 - 20 / 5 = 4 余 0 但是正确答案是`4`而不是`0`。优先级高的运算符要先计算,在Swift和C语言中,都是先乘除后加减的。所以,执行完乘法和求余运算才能执行加减运算。