each 是一种方法,它接受一个代码块(block of code),然后针对列表中的每个成员执行这个代码块,而在do和end之间的部分便是这个非常类似匿名函数的代码块。
基于44个网页-相关网页
·2,447,543篇论文数据,部分数据来源于NoteExpress
为什么呢?因为该代码块指定了在测试正确的情况下,我将进行的一系列操作。
Why? Because that block identifies a set of things that I'm going to do if the test is true.
因此,你可以从任何代码块访问流程变量。
So, you can access the process variables from any code block.
代码块中包含设置工作。
All right, you can see that this little piece of code, it's got a loop in there, and what's it doing?
好,你们看到的这一小块代码,是做了一个循环吧?,他在做什么?
Thing I've got a little procedure that could do that, but you know the simplest thing I could do is to say well, gee, wait a minute, why don't I just check to see if these are the same thing?
这两个点是同一个点么?,我已经写了一小块代码,可以提供这个功能,但是你知道的我可以做的,最简单的事情就是说好,嗯?,等等,我为什么不直接去看看,这两个东西相等不相等呢?
You begin to realize that all of these big seemingly complicated pieces of software in websites that you use, if you just hone in on little pieces of them at a time and you realize oh I can do that and oh I can do that.
你开始意识到,你所登陆的网站上这些大而复杂的软件,如果你只对其中的一小块代码进行研究,你就会发现,哦,我也可以来做这个。
应用推荐