在列表1所显示的例子中,输入字符串变量被跟踪。
In the example shown in Listing 1, the input string variable is tracked.
在命令行中执行的时候,该程序将XML内容从文件读入一个字符串变量。
When executed from a command line, the program reads the XML content from a file into a string variable.
其次,可以轻易地替换字符串中的变量值。
Second, you can easily substitute variable values inside strings.
选择需要用变量替换的字符串部分 —在本例中为数字5。
Select the portion of the string you want to replace with a variable — in this example, the numeral 5.
语句字符串中的?(问号)是一个参数标识,代表用来返回结果的变量。
The? (question mark) literal in the statement string is a parameter marker that represents the variable in which the result is returned.
该方法取得电话号码并构造存储在url变量中的ur l字符串。
That method then grabs the number and USES it to construct a url string stored in the url variable.
清单1中的示例说明了如何创建多种类型的变量(整型、浮点、字符串、数组和函数)。
The example in Listing 1 illustrates variable creation of a variety of types (int, float, string, array, and function).
通过在一个HATS全局变量中设置这个值,您可以将输入改变成任何特定的字符串。
A You can change this input to any application-specific string by setting this value in a HATS global variable.
如果这个元素的名字是title,这段代码将把该元素的实际内容放到字符串变量title中。
If the name is title, the code puts the actual contents of the element into the String variable title.
在清单5中,测试不需要与字符串进行比较,因为变量返回一个Boolean类型而不是rtf作为select属性的结果。
In Listing 5, the test does not need to compare to a string because the variable returns a Boolean type rather than an RTF as a result of the select attribute.
在上面的命令序列中,把变量var设置为两字母的字符串ls。
In the sequence above, the variable var is set to the two-letter string ls.
这个程序试图在一个尚未分配的内存中保存数据:它执行一个字符串复制操作,将arr中的数据复制到p变量中。
This program tries to store to an unallocated memory location by doing a string copy from arr to the p variable. The expected result is a SEGSEGV signal, as you can see
在本例中,我们创建了发送文本及HTML版本的消息,所以我们创建变量来保存这两个字符串。
In this case, you create a message that sends a text and an HTML version of the message, so you create variables to hold both strings.
最后一个游标的SQLERROR被返回,而最后一个失败的sql语句的错误字符串将被存储到变量SQLERRSTR中。
SQLERROR of the last cursor is returned, and the error string of the latest failed SQL statement is stored into variable SQLERRSTR.
您还可以简单地将整个字符串放到单引号(')中,但是需要在变量中真正的单引号字符前面加上一个反斜线(\ ')。
You can also simply enclose the entire variable value in single quotation marks (') as long as you precede any actual single quotation marks in the variable with a backslash (\ ').
字符串用单引号限定,从而节省了PHP从字符串中搜索可替换的变量的时间。
Strings are delimited by single quotes instead of double quotes to avoid the performance hit of PHP searching for variables to interpolate within the strings.
这个字符串被保存在私有变量中,这样当枚举器调用matches()方法创建结果集的时候就可以访问这个字符串。
The string is saved in a private variable so we have access to the string when the enumerator calls the matches() method to create the result set.
首先,从最主要的角度来看,函数的目的是“查找与第一个模式中的值匹配的字符串,然后通过将第三个变量作为要操作的字符串,以第二个模式替换匹配结果”。
First, in broadest terms, the function's purpose is to "match what is in the first pattern, then replace it with the second pattern, using the third argument as the string to operate on."
对于这个示例中的格式字符串,有意思的一点是:同一个局部变量 (cmdName)在同一个字符串中出现了多次。
The interesting thing to note about the format string in this example is that the same local variable (cmdName) occurs multiple times in the same string.
值得一提的是,如果结果集返回xml字符串,应该用花括号将返回字符串中的变量包围起来。
One thing that is worth noting: when you return a string of XML as your result set, you should surround the variables in your return string within curly braces.
exists函数确定是否定义了一个具有由字符串定义的名称的变量(在本例中为全局变量g: syntax_on)。
The exists function determines whether a variable with the name specified by the string (in this case, the global variable g: syntax_on) has been defined.
我只使用数字和字符串作为模型中的类变量。
I have only used Numbers and strings as variables in the model class.
例8 - 5中的函数从接受两个字符串变量开始。
The function in Example 8-5 begins by accepting two string parameters.
要保存的值可以是数值或字符串,每个值有其唯一的下标,并且按顺序存放在数组变量中。
The values can be Numbers or strings. A key or subscript value is automatically assigned, and the values are kept in the order entered.
事实上,看一看搜寻结果页面上的UR L字符串,你搜寻用的关键字是被包含在一个含有可替换变量的链接中的。
In fact, if you look at the URL in the resulting page, the search term you were looking for is included in the link as a replaceable variable.
事实上,看一看搜寻结果页面上的UR L字符串,你搜寻用的关键字是被包含在一个含有可替换变量的链接中的。
In fact, if you look at the URL in the resulting page, the search term you were looking for is included in the link as a replaceable variable.
应用推荐