Difference between revisions of "CAObject::Result/en"

(Importing a new version from external source)
 
 
(14 intermediate revisions by the same user not shown)
Line 2: Line 2:
 
[[ADE User Guide]] > [[ADE Server Class Reference]] > [[CAObject]]
 
[[ADE User Guide]] > [[ADE Server Class Reference]] > [[CAObject]]
 
<languages />
 
<languages />
= Description =
+
= 描述 =
  
Returns the result of evaluating a variable as a variant. This is convenient when you know the result is a scalar (a non-array), since you obtain the result directly as a number, text, etc. If the result is an array, the array is collapsed into a representation of the array, which is usually not very convenient. If the result might be array-valued, it is usually preferable to use [[CAObject::ResultTable|ResultTable]] instead.
+
作为一个变体返回一个变量计算后的结果。当你知道结果是一个标量(非数组)时,这很方便,因为你可以直接获得数字、文本等结果。如果结果是一个数组,该数组将分解成数组的一种表达方式,这通常不是很方便。如果结果可能是数组值,通常我们使用[[CAObject::ResultTable/zh | ResultTable]]
  
The [[CAObject::ResultType]] property controls which result is computed ([[Mid]], [[Mean]], etc.). The other possible [[CAObject::ResultType|ResultType]]s are usually array-valued, hence not used very often with this method.
+
[[CAObject::ResultType/zh | ResultType]]属性控制计算哪种结果:[[Mid]](中值)、[[Mean]](平均值)等等。其它可能的[[CAObject::ResultType/zh | 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 [[CAEngine::ErrorCode|ErrorCode]] is 77.
+
如果变量还没有被计算,当其方法被调用时将被计算。如果这需要冗长计算,该调用将花很长时间完成。当[[CAObject::MethodEvaluationTimeLimit/zh | MethodEvaluationTimeLimit]]设定好后,如果超出时间限制,结果将终止,[[CAEngine::ErrorCode/zh | 错误代码]]为77。
  
If an error occurs during evaluation, the [[CAEngine::ErrorCode|ErrorCode]] will be set to something other than 0 or 2. If a warning occurs during evaluation, a result will be returned and the [[CAEngine::ErrorCode|ErrorCode]] will be 2. The [[CAEngine::OutputBuffer|OutputBuffer]] contains the error message or warning.
+
如果在计算过程中出现错误,[[CAEngine::ErrorCode/zh | 错误代码]]将被设定为0或2以外的数值。如果在计算过程中发生警告,结果将被返回,[[CAEngine::ErrorCode/zh | 错误代码]]将为2。[[CAEngine::OutputBuffer/zh | OutputBuffer]]包含错误信息或者警告。
  
= Data type =
+
= 数据类型 =
  
variant
+
变体
  
= Access =
+
= 访问 =
  
read
+
读取
  
= Usage =
+
= 用法 =
  
 
<code>
 
<code>
Line 26: Line 26:
 
</code>
 
</code>
  
= Errors Codes =
+
= 错误代码 =
  
''This list is incomplete -- TBD''
+
''该清单不完整 -- 待定''
: 0 - success
+
: 0 - 成功
: 2 - warning
+
: 2 - 警告
: 12 - insufficient memory
+
: 12 - 内存不足
: 37,38 - Could not retrieve result
+
: 37,38 - 无法检索结果
: 77 - [[CAObject::MethodEvaluationTimeLimit|MethodEvaluationTimeLimit]] exceeded
+
: 77 - [[CAObject::MethodEvaluationTimeLimit/zh | MethodEvaluationTimeLimit]]溢出
: 78 - Computation aborted
+
: 78 - 计算中值
  
= See Also =
+
== 另请参考 ==
  
* [[CAObject::ResultTable]]
+
* [[CAObject::ResultTable/zh | CAObject::ResultTable]]
* [[CAObject::ResultType]]
+
* [[CAObject::ResultType/zh | CAObject::ResultType]]
* [[CATable]]
+
* [[CATable/zh | CATable]]

Latest revision as of 06:21, 17 October 2015

ADE User Guide > ADE Server Class Reference > CAObject

Other languages:
English • ‎中文

描述

作为一个变体返回一个变量计算后的结果。当你知道结果是一个标量(非数组)时,这很方便,因为你可以直接获得数字、文本等结果。如果结果是一个数组,该数组将分解成数组的一种表达方式,这通常不是很方便。如果结果可能是数组值,通常我们使用 ResultTable

ResultType属性控制计算哪种结果:Mid(中值)、Mean(平均值)等等。其它可能的 ResultType通常是数组值得,因此使用此方法非常常见。

如果变量还没有被计算,当其方法被调用时将被计算。如果这需要冗长计算,该调用将花很长时间完成。当 MethodEvaluationTimeLimit设定好后,如果超出时间限制,结果将终止, 错误代码为77。

如果在计算过程中出现错误, 错误代码将被设定为0或2以外的数值。如果在计算过程中发生警告,结果将被返回, 错误代码将为2。 OutputBuffer包含错误信息或者警告。

数据类型

变体

访问

读取

用法

res = obj.Result()

错误代码

该清单不完整 -- 待定

0 - 成功
2 - 警告
12 - 内存不足
37,38 - 无法检索结果
77 - MethodEvaluationTimeLimit溢出
78 - 计算中值

另请参考

Comments


You are not allowed to post comments.