将状态表实现为适用于所有事件的通用处理函数,并为所有操作和转换提供一个函数数组。
You implemented your state table as a common handler for all events, plus a function array for all actions and transitions.
使用函数preg_grep可以非常轻松地处理列表:只需提供模式作为第一个参数,并提供要匹配的单词数组作为第二个参数。
The function, preg_grep , makes processing a list very easy: Simply provide the pattern as the first argument and an array of words to match as the second argument.
序列数组由ariablepersister函数处理,创建一个与variablepersister类相同名字的变量,该类创建自以_ POINTER为后缀的模板。
Sequential arrays are processed by the VariablePersister function, creating a variable identified as the same name of the VariablePersister class created from the template suffixed with _pointer.
Blitz还处理标准计算器类型函数,所以数组可在标准输出上显示,而且可从文件中读入或发送到文件。
Blitz also possesses the standard calculator type functions, so arrays can be displayed on the standard output, and can be read from and sent to files.
Perl子例程 checksize 处理整个文件(作为 Perl数组 @_ implicit的一部分)并检查函数长度。
The Perl subroutine checksize traverses over the whole file (as part of the @_ implicit array in Perl) and keeps checking for function lengths.
因为搜索结果存储在一个数组中,您肯定希望函数遍历该数组,就像处理其他编程语言的数据对象一样。
Since the search results are being stored in an array, you'd expect functions to work through the array like you would any data object in any programming language.
现在我们处理的不是C语言和它的数组,我们想用字符串偏移量,所以我们需要一个哈希函数,为每个键值计算出一个数值。
Now we're not dealing with C and C arrays but also want to use string offsets so we need a function to calculate a numeric value, a hash, for each key.
从根本上说,现在它成为数组处理模式,只有一点不同:处理函数就包含在数组项中。
Fundamentally, this now becomes an array-processing pattern, with the sole difference that processing an item involves executing the function contained in the item.
因为数组会被自动转化为指针,所以处理数组的函数通常通过操纵指向数组指向数组中的元素的指针来处理数组。
Because arrays are automatically converted to Pointers, functions that deal with arrays usually do so indirectly by manipulating Pointers to elements in the array.
其他数据类型(如函数指针、数组和结构)需要一些附加特性以确保进行正确的数据封送处理。
Other data types, such as function Pointers, arrays, and structures, require additional attributes to ensure proper data marshaling.
其他数据类型(如函数指针、数组和结构)需要一些附加特性以确保进行正确的数据封送处理。
Other data types, such as function Pointers, arrays, and structures, require additional attributes to ensure proper data marshaling.
应用推荐