CompiledFunction::cfex
更多信息
-
- This message is generated when the compiler calls external (uncompiled) evaluation to compute the value of an expression and the result does not have the expected form.
- This message will often be preceded by other messages that provide additional details about the error.
- External evaluation is evaluation that is done outside of the compiler.
- External evaluation is used for expressions that are not recognized by the compiler, such as symbolic global variables.
- The instruction referred to in the warning message can be found in the fourth argument of the CompiledFunction expression. This instruction will always correspond to external evaluation. It is sometimes possible to determine the cause of the error by looking at the arguments of this instruction.
- Off[message] switches off the message; On[message] switches it on. For example: Off[CompiledFunction::cfex].
范例
基本范例 (1)
The global variable in the CompiledFunction expression should evaluate to a real number:
Compiled evaluation proceeds if the result of external evaluation is a real number:
The instruction that led to the error can be obtained from the CompiledFunction expression: