1
fantasticfears 2013 年 10 月 29 日 对于i = 0; i < N和i = 1; i <= N的循环次数计数来说N - 0 = N次和N - 1 + 1 = N,前者是更直观的,详细见Dijkstra对此的解释:http://www.cs.utexas.edu/users/EWD/ewd08xx/EWD831.PDF
[1] stackoverflow, Why does the indexing start with zero in 'C'? http://stackoverflow.com/questions/7320686/why-does-the-indexing-start-with-zero-in-c [2] Guido van Rossum about why python uses 0-based index https://plus.google.com/115212051037621986145/posts/YTUxbXYZyfi |
2
krfantasy 2013 年 10 月 29 日
偏移量
|
3
cctvsmg 2013 年 10 月 29 日
lua的下标为什么要从1开始? 反人类!
|
4
AstroProfundis 2013 年 10 月 29 日
|
5
angelface 2013 年 10 月 29 日
数组的下标应该从0还是1开始?我提议的妥协方案是0.5,可惜他们未予认真考虑便一口回绝。
----Stan Kelly-Bootle |
6
angelface 2013 年 10 月 29 日
|
7
10iii 2013 年 10 月 29 日 a[i] == a + i;
|
10
28hua OP @fantasticfears 这样的话就不必老纠结多1少1的问题了。
|