Error Messages/40280

< Error Messages
Revision as of 23:36, 29 February 2016 by Bbecane (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)


Error Message Example(s)

In the call to function WhatIf, the second parameter, V, must identify a variable object.

Cause

A function (in the example message, WhatIf) was call that expects a variable identifier for one of the parameters. However, something other than a variable identifier was passed.

The following is an example that generates this error:

Var x := 0;
F(x)/WhatIf(F(x), x, 3)

In this case, the second parameter to WhatIf is a local variable, x, which does not qualify as a variable object (a variable object would need to be a variable that appears on an influence diagram). When a function parameter is declared as type Variable, it must be an actual variable object, not a local variable. (Note: A local variable can be used if it is a LocalAlias of an actual variable object, or a MetaVar that holds a handle to a global object).

See Also

Comments


You are not allowed to post comments.