IDID - Object identification string

Description:
This attribute contains a string which may be used to identify the ObjectObject to which it is attached. There is no restriction on the contents of this string, which is not used internally by the AST library, and is simply returned without change when required. The default value is an empty string.

An identification string can be valuable when, for example, several Objects have been stored in a file (using astWriteastWrite) and are later retrieved (using astReadastRead). Consistent use of the ID attribute allows the retrieved Objects to be identified without depending simply on the order in which they were stored.

This attribute may also be useful during debugging, to distinguish similar Objects when using astShowastShow to display them.

Type:
String.
Class Applicability:
Object
All Objects have this attribute.
Notes:
  • Unlike most other attributes, the value of the ID attribute is not transferred when an Object is copied. Instead, its value is undefined (and therefore defaults to an empty string) in any copy. However, it is retained in any external representation of an Object produced by the astWrite function.