Comments (3)
Hi @wglnngt ,
Thanks a lot for pointing out the issues.
其一
名之
in function parameters are indeed typos, 曰「恃」
is the correct syntax, I've corrected them now: 77581d4
其二
Indeed the first snippet has syntax errors and the second one is syntactically correct. I think the compiler does a correct job of finding the error. e.g. running the first snippet on https://ide.wy-lang.org/ gives:
SyntaxError: Unexpected token '}'
And javascript:
while (true) {
if (藏.length > 層) {
break;
};
var _ans1 = [];
藏.push(_ans1);
}; /*"其它正常循環體中邏輯語句"*/
};
Which seems like the correct behavior.
Assuming that you took the snippets out of 賈憲三角 example, I think the confusion might come from the fact that the indentation are garbled due to space/tab issue (now fixed), and that I'm merging some lines to make it read more smoothly and more succint.
The actual structure is like so:
恆為是。
若「藏」之長大於「層」者。
乃止
也
吾有一列。充「藏」以其。
也。
⋯⋯
若「知甲」者。
⋯⋯
若非。
⋯⋯
云云。
⋯⋯
So the first part is actually a while(true){if(case)break; statement}
logic, which one might write as while(!case){statement}
in other languages.
其三
Oops, typo. Now corrected in d6761e2
Thanks again for spotting these mistakes!
from book.
感謝回覆與處理。例二反饋確引用不當,感謝指正。
關于例程代碼的簡寫。個人建議可以先按邏輯語法當斷則斷。易于新學者更快理解用法(新學者往往還未建立足夠的關鍵語法敏感度,且之乎者也云云之類,初學之時易就以往漢語語境經驗一眼帶過)。如:
凡「甲」中之「元」。
施「法」於「元」。
若其然者。
充「乙」以「元」。
也。
云云。
此義一目了然。后跟以簡潔版。
凡「甲」中之「元」。
施「法」於「元」。若其然者。充「乙」以「元」也。
云云。
如此,既可明語法之要點,亦可免因疏忽導致的語法問題(上述代碼在最近更新b19072e中,仍少一結束關鍵字云云/也),后加以簡明版代碼,兩相比較,更可彰顯漢語代碼結構之美。:)
from book.
Thanks a lot @wglnngt ,
I just fixed the missing 云云 mistake: 538a000
My original plan was to use more verbosely formatted examples in the early chapters, and assume by chapter 8 the reader is familiar enough with most wenyan syntaxes that they'll be able to read the condensed ones. I also want to avoid repeating examples twice just for showing whitespace differences. But your suggestion does make a lot of sense too, let me think more about this.
Thanks!
from book.
Related Issues (20)
- Mistakes in「算術第三」and「行列第六」 HOT 5
- Missing 「忽」 in 「算術第三」
- 二千二百八十三 → 二千二百八十四 in 算術第三 HOT 1
- The code following 易首句 does not change the 首句 HOT 1
- Array-copying algorithm fails HOT 1
- Ignore this
- 第七第八用字疑義 HOT 6
- 第九代碼疑義 HOT 2
- 第十一至第十三用字疑義 HOT 7
- 別言語者另有『引號』 why not? HOT 2
- 纸质版有没有?
- A brilliant idea HOT 4
- 关于pr #29 HOT 2
- 圖畫第十二 程序错误 HOT 1
- A wrong character in Calculation The Third
- 明义第一里面最后压缩过的程序不对
- Typo in 算術第三?
- 求字体 HOT 2
- Simplified Version Link in README has downed now.
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from book.