The most common text output methods are puts, which adds a newline to the end of the output, and print, which does not.
最常见的文本输出方法有 puts 和 print,前一个方法在输出的末端增加一个换行符,后一个方法则不是。
Tiny print at the end of each search result lets you know whether it is a "sponsored" result or not - e.g., an AD.
每个搜索结果的结尾很少留有标识,使你不知道搜索结果是否是做了手脚的,比如说赞助商的一则广告。
At the end of the call, if I have to get busy with other things, I'll print this map out and throw it into my in-basket.
会议结束后,尽管有时候不得不我忙于其他事,我会把这个规划图打印出来放到我的代办事宜夹里。
And along the way I'm keeping track of how many iterations at the end I'll print how many iterations I took, before I return the final guess.
提到的方法去运行,并且我会跟踪到底,进行了多少次迭代,并在最后返回结果之前,显示进行了多少次迭代。
Let's check it out. I've written a little bit of a test script here, so if we test cell sort, and I've written this so that it's going to print out what the list is at the end of each round, OK.
我们来检查检查,我写了一个小测试脚本,我写这个脚本来测试单元排序,它能够打印出每一轮结束后,链表的是什么样子的。
So we looked at a number of fairly small programs that at the end of the day did very little more than print hello world and the like.
这堂课最后,如果我们只是看几个小程序,根本没啥用,还不如hello,world程序呢。
应用推荐