这里有很多种方式来实现这个功能。
实现这个功能需要一些特定的要素,如图 3 所示。
This functionality requires a few specific elements, shown in Figure 3.
您前面见过的许多示例都可以实现这个功能。
Suppose I take a number. I'd like to add up all the digits inside of the number.
我可以用到刚刚提到的工具,来实现这个功能。
So to really add to this, we need to have branching programs.
因此为了实现这个功能,我们需要分支式程序。
Another way of saying it is, anything that uses get float doesn't care what the details are inside or shouldn't, and if I change that definition, I don't have to change anything elsewhere in my code, whereas if I just have the raw code in there, I have to go off and do it.
换种说法就是,任何用到获取,输入这个功能的人不用担心具体的实现细节,如果我改变了这里的实现,我并不需要去改变我的代码,因为我的最底处的源码就在这里,我去改这里就可以了。
应用推荐