Error Messages/40093

Example message text

Object x in "attrib Of x" does not exist


The syntax "«attrib» of «obj»" returns the current value of the indicated attribute of object «obj». For example, title of Va1 returns the current value of the title attribute of variable Va1. If your model does not contain any variable named Va1, this error results.

One source of confusion that can lead to this error has to do with whether «x» is bound at parse time or at evaluate time. Suppose Va1 is a global variable (i.e., a variable node appearing on your diagram) and you evaluate title of Va1. Here the expression is bound at parse time, so that it is looking for the title of Va1, which should present no problem since that object exists. However, consider the following expression:

MetaVar v := Va1;
title of v

Here v is a local variable, and hence does not correspond to any object, global or otherwise. Hence, in this case, v is evaluation-time-bound, such that the expression title of v refers to the title of the object pointed to by v. What happens here is that when v is defined, Va1 is evaluated, and its result is assigned to v. If that result is a handle to an object, then everything is fine. But if Va1 were to evaluate to 3.14 or any other non-handle, then this error would result.

If the «obj» parameter is an expression, it will be dynamically-bound as well. The simplest (trivial) expression is obtained by surrounding the identifier by parentheses, as in title of (Va1). This is functionally different from the very similar looking title of Va1 since (Va1) is treated as an expression whose value is obtained only at evaluation time by evaluating (Va1).

See Also


You are not allowed to post comments.