CAObject::Result
ADE User Guide > ADE Server Class Reference > CAObject
描述
作为一个变体返回一个变量计算后的结果。当你知道结果是一个标量(非数组)时,这很方便,因为你可以直接获得数字、文本等结果。如果结果是一个数组,该数组将分解成数组的一种表达方式,这通常不是很方便。如果结果可能是数组值,通常我们使用 ResultTable。
ResultType属性控制计算哪种结果:Mid(中值)、Mean(平均值)等等。其它可能的 ResultType通常是数组值得,因此使用此方法非常常见。
If the variable has not yet been evaluated, it is evaluated when this method is called. If this requires a lengthy calculation, the call will take a long time to complete. When CAObject::MethodEvaluationTimeLimit is set, then the result aborts if the time limit expires and ErrorCode is 77.
If an error occurs during evaluation, the ErrorCode will be set to something other than 0 or 2. If a warning occurs during evaluation, a result will be returned and the ErrorCode will be 2. The OutputBuffer contains the error message or warning.
数据类型
变体
访问
读取
用法
- res = obj.Result()
错误代码
该清单不完整 -- 待定
- 0 - 成功
- 2 - 警告
- 12 - 内存不足
- 37,38 - 无法检索结果
- 77 - MethodEvaluationTimeLimit溢出
- 78 - 计算中值
Enable comment auto-refresher