点击或拖拽改变大小

CoreDb.Eval 方法

X#
Evaluate a code block for each record that matches a specified scope and/or condition.

命名空间:  XSharp
程序集:  XSharp.Core (在 XSharp.Core.dll 中) 版本:2.22 GA
语法
 STATIC METHOD Eval(
	uBlock AS ICodeblock,
	uCobFor AS ICodeblock,
	uCobWhile AS ICodeblock,
	uNext AS Object,
	nRecno AS Object,
	lRest AS LOGIC
) AS LOGIC
查看代码

参数

uBlock
类型:ICodeblock
The code block to execute for each record that matches the scope and conditions.
uCobFor
类型:ICodeblock
A code block that defines a condition that each record within the scope must meet in order to be processed.
uCobWhile
类型:ICodeblock
A code block that defines another condition that each record must meet in order to be processed. As soon as a record is encountered that causes the condition to fail, the operation terminates. If no scope is specified, cbWhileCondition changes the default scope to lRest.
uNext
类型:Object
The number of records to process, starting at the current record.
nRecno
类型:Object
The number of the record to process.
lRest
类型:Boolean
TRUE processes only records from the current record to end-of-file. FALSE processes all records.

返回值

类型:Boolean
TRUE if successful; otherwise, FALSE.
备注
By default, Eval() operates on the currently selected work area. It will operate on an unselected work area if you specify it as part of an aliased expression. On each iteration, Eval() evaluates the specified code block. All records within the scope or matching the condition are processed until end-of-file is reached. Eval() can be used as a primitive for the construction of commands that process database files. In fact, many of the database processing commands are created using Eval().
参见