AlignAssignments() 中的第一个 for 循环判断其中的赋值运算符应当对齐的列。
The first for loop in AlignAssignments() determines the column in which the assignment operators should be aligned.
现在,问题是如何不通过赋值来进行循环?
当for循环遍历了所有行之后,这些行中的赋值运算符将被正确对齐。
Once the for loop has iterated all the lines, any assignment operators within them will now be aligned correctly.
But that little short hand there is doing exactly the same thing. It is adding that value into some digits and putting it back or signing it back into some digits. And I'll walk through that loop and when I'm done I can print out the total thing does. And if I do that, I get out what I would expect.
加上得到的这个数的,但是这个缩写声明其实是进行了同样的操作,它把我们得到的这个数加到一个数上面去,然后用和对这个数进行了重新赋值,在循环中会去遍历字符串,当完成循环后,程序会显示数字的总和,如果我运行,这个程序的话,我会得到我期待的结果。
应用推荐