References and Data Structures
Revision as of 16:51, 16 December 2015 by Jhernandez3 (talk | contribs) (Created page with "Category: Analytica User Guide <breadcrumbs> Analytica User Guide > {{PAGENAME}}</breadcrumbs><br /> A '''reference''' is an indirect link to a value, an atom or an array...")
A reference is an indirect link to a value, an atom or an array. A variable can contain a single reference to a value, or it can contain an array of references. Variables and arrays can themselves contain references, nested to any depth. This lets you create complex data structures, such as linked lists, trees, and non-rectangular structures. Use of references is provided by two operators:
- \e is the reference operation. It creates a reference to the value of expression e.
- #e is the dereference operation. It obtains the value referred to by e. If e is not a reference, it issues a warning and returns Null.
An example: Variable M Definition: 100
Variable Ref_to_M Definition: \ M
The result of Ref_to_M looks like this:
Comments
Enable comment auto-refresher