Difference between revisions of "Self"

 
Line 1: Line 1:
Self is used in the definition of a Variable to refer to that variable.  Usually, a variable cannot refer to itself -- because it creates a cyclic dependency -- so you cannot use Self in common expressions. One exceptions are in function [Dynamic]()  refer to Self at a preceding Time period, e.g.
+
Self is used in the definition of a Variable to refer to that variable.  Usually, a variable cannot refer to itself -- because it creates a cyclic dependency -- so you cannot use Self in common expressions. One exceptions are in function [[Dynamic]]()  refer to Self at a preceding Time period, e.g.
 
  Variable X := Dynamic(10, Self[Time-1] * (1 + growth))
 
  Variable X := Dynamic(10, Self[Time-1] * (1 + growth))
 
The last parameter of Dynamic is an expression that can refer to Self, provided it is for a previous Time, as in this case.
 
The last parameter of Dynamic is an expression that can refer to Self, provided it is for a previous Time, as in this case.
  
The other exception is in [IntraTable], a new feature not officially released that allows cells of a table to refer to each other, using Self.
+
The other exception is in [[IntraTable]], a new feature not officially released that allows cells of a table to refer to each other, using Self.

Revision as of 21:22, 10 February 2009

Self is used in the definition of a Variable to refer to that variable. Usually, a variable cannot refer to itself -- because it creates a cyclic dependency -- so you cannot use Self in common expressions. One exceptions are in function Dynamic() refer to Self at a preceding Time period, e.g.

Variable X := Dynamic(10, Self[Time-1] * (1 + growth))

The last parameter of Dynamic is an expression that can refer to Self, provided it is for a previous Time, as in this case.

The other exception is in IntraTable, a new feature not officially released that allows cells of a table to refer to each other, using Self.

Comments


You are not allowed to post comments.