如果需要创建与时间相关的数据类型的单个值,可以使用类型构造器函数并提供时间的字符串表示形式作为参数。
When you want to create an atomic value of one of the time-oriented data types, use a type-constructor function and provide the string representation as an argument.
而其内置的字符串操纵函数(包括正则表达式),以及程序上的特性和方便性使它成为创建简单“脚本”程序的理想语言。
And its built-in string manipulation functions (including regular expressions), as well as procedural and convenience features make it the ideal language for creating simple "scripting" programs.
看看构造函数,确保只创建了需要的字符串。
Look at the constructor and ensure that only the desired strings are created.
清单1中的示例说明了如何创建多种类型的变量(整型、浮点、字符串、数组和函数)。
The example in Listing 1 illustrates variable creation of a variety of types (int, float, string, array, and function).
例如,假设您希望创建一个CommentBlock函数,它将接收一个字符串并针对不同的编程语言将其格式化为相应的注释块。
For example, suppose you wanted to create a CommentBlock function that was passed a string and formatted it into an appropriate comment block for various programming languages.
此外,可以通过在过程中使用writetrace函数,向soltrace . out文件发送一个字符串,从而创建一个用户定义的跟踪:writetrace (stringVARCHAR)。
In addition, you can create a user-defined trace by sending a string to the soltrace.out file by using the writetrace function in the procedure: writetrace (string VARCHAR).
存储了时间数据后,就可以使用nf函数创建一个字符串,它可以将数字转变为字符串。
With the time data stored, you then create a string using the nf function, which converts Numbers into strings.
我可以在查询字符串中放入一个记号([value*]),然后在查询结果可以被访问的时候,创建一个用来得到cutoffDate值的函数。
What I’m doing is placing a token ([value*]) in the query string and then creating a function that I can use to get the value of cutoffDate when the results of the query are accessed.
此函数首先创建了一个空字符串。
第三个构造函数采用了字符串“100”并创建了以10为基数的整数值(常见的十进制系统)。
The third constructor takes the string of characters "100" and creates an integer in base 10 (the familiar decimal system).
最后一个构造函数也采用了字符串“100”——但是它使用基数8来创建整数值,通常称为八进制。
And the final constructor takes the string of characters "100" — but this time creates an integer using base 8, which is more commonly known as base octal.
对于本例来说,创建count函数来将整个文件读取到一个大字符串中,然后计算参数数量及新添参数数量。
For this example, you create a count function to read the entire file into one big string, and then count the total number of characters and the number of newline characters.
但是您也可以使用str类构造函数显式地创建字符串对象,如清单6所示。
But you can also explicitly create a string object by using the STR class constructor, as shown in Listing 6.
在清单15中,我们创建了一个match函数(用于查找具有字符串参数的连接节点)和一个editor函数(用于对连接求值),再次遇到了对concat函数求值的问题。
In Listing 15, we revisit our problem of evaluating a concat function by creating a match function (to find concat nodes with string-literal arguments) and an editor function (to evaluate the concat).
调用此函数将串联所指定的数组元素以创建一个字符串。
Calling this function creates a single string by concatenating the array elements you specify.
修饰名是在编译函数定义或函数原型期间由编译器创建的字符串。
A decorated name is a string created by the compiler during compilation of the function definition or prototype.
修饰名是在编译函数定义或函数原型期间由编译器创建的字符串。
A decorated name is a string created by the compiler during compilation of the function definition or prototype.
应用推荐