Example #1
0
        ///<summary>
        /// Returns the Evaluation at the relative index given.  This should be
        /// zero or a negative number as a relative reference back up the evaluation
        /// stack.  Therefore getEvaluation(0) returns the current Evaluation.
        ///</summary>
        public Evaluation getEvaluation(int relativeIndex)
        {
            Evaluation result = null;

            if (relativeIndex <= 0)
            {
                result = currentEvaluation;
                while ((++relativeIndex < 0) && (result != null))
                {
                    result = result.getParent();
                }
            }
            return(result);
        }