Stack of [[ExcelCalcValue]] instances used to evaluate formulas.

The number stack is used for evaluating formulas. When formulas are compiled, the formula tokens are placed in a collection in post-fix, or Reverse Polish Notation (RPN) format. RPN format arranges the formula token list so each sub-expressions's terms are placed before their operator, and sub-expressions are ordered to enforce correct operator precedence. This format allows the formula evaluate method to loop through the formula token collection front to back pushing an operator's terms onto the number stack until an operator is reached. Each time an operator is reached, it's subexpression is computed and resulting value pushed onto the number stack. Once the end of the end of the formula collection is reached, the formulas calculated value is at the top of the number stack.

Hierarchy

Hierarchy

  • Base
    • ExcelCalcNumberStack

Constructors

  • Parameters

    Returns ExcelCalcNumberStack

  • Returns ExcelCalcNumberStack

  • Parameters

    • Rest ..._rest: any[]

    Returns ExcelCalcNumberStack

Properties

$type: Type
$t: Type
nextHashCode: number

Accessors

  • get owningCell(): WorksheetCell
  • Gets the [[WorksheetCell]] instance whose formula is currently being solved.

    Returns WorksheetCell

Methods

  • Remove all values from number stack.

    Returns void

  • Return the number of values on number stack

    Returns number

  • Parameters

    • other: any

    Returns boolean

  • Returns number

  • Returns Base

  • Return value off top of the number stack.

    Returns ExcelCalcValue

  • Pop value off top of the number stack.

    Returns ExcelCalcValue

  • Push a value onto number stack.

    Parameters

    Returns void

  • Clear elements off top of number stack until it contains given number of elements

    Parameters

    • elements: number

      Denotes the desired stack level

    Returns void

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns number

  • Parameters

    • item1: any
    • item2: any

    Returns boolean

  • Parameters

    • a: any
    • b: any

    Returns boolean

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns any[]

  • Parameters

    • obj: any

    Returns number

  • Parameters

    • a: any
    • b: any

    Returns boolean