清单1显示了一些例子,说明了提示字符串(来自PS 1环境变量)与本文中的其他例子不同。
Listing 1 shows some examples where the prompt strings (from the PS1 environment variable) are different from the other examples in this article.
不幸的是,提示仅对对象有效,所以不能在参数列表中要求字符串或整数。
Unfortunately, hinting works only for objects, so you cannot require a string or an integer in your argument lists.
这时没有发出警告,但提示符更改为包括一个(CONNECTION1)字符串。
This time no warning is issued, but the prompt changes to include a (CONNECTION1) string.
So when you have a function called GetString, -- that means it's going to get a string from the user -- -- prompt the user for a string -- whereas printf is literally going to print it, not to paper, but to the screen.
所以当你有一个叫做GetSting的函数,它的意思是从用户那获得一个字符串-,提示用户输入一个字符串-,然而printf的确是用来打印的,不是在纸上,而是在屏幕上。
应用推荐