| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| real(kind=r64), | intent(out), | DIMENSION(MaxNumMonths) | :: | monthlyArray | ||
| integer, | intent(inout) | :: | variablePointer | 
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Nodes of different colours represent the following:
Solid arrows point from a procedure to one which it calls. Dashed arrows point from an interface to procedures which implement that interface. This could include the module procedures in a generic interface or the implementation in a submodule of an interface in a parent module. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
SUBROUTINE popStack(monthlyArray,variablePointer)
          ! SUBROUTINE INFORMATION:
          !    AUTHOR         Jason Glazer of GARD Analytics, Inc.
          !    DATE WRITTEN   July 2004
          !    MODIFIED       na
          !    RE-ENGINEERED  na
          ! PURPOSE OF THIS SUBROUTINE:
          !    A stack is used in the evaluation of the tariff since
          !    the variables and operators are in a reverse polish
          !    notation order. The stack operates on a last-in
          !    first out basis. The stack consists of both a pointer
          !    to the variable and the twelve monthly values.
          !    This routine returns the item on the top of the stack
          !    and removes it from the stack.
          ! METHODOLOGY EMPLOYED:
          ! REFERENCES:
          ! na
          ! USE STATEMENTS:
IMPLICIT NONE    ! Enforce explicit typing of all variables in this routine
          ! SUBROUTINE ARGUMENT DEFINITIONS:
REAL(r64), DIMENSION(MaxNumMonths),INTENT(OUT) :: monthlyArray
INTEGER,INTENT(INOUT)                     :: variablePointer
          ! SUBROUTINE PARAMETER DEFINITIONS:
          ! na
          ! INTERFACE BLOCK SPECIFICATIONS
          ! na
          ! DERIVED TYPE DEFINITIONS
          ! na
          ! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
IF (topOfStack .GE. 1) THEN
  variablePointer = stack(topOfStack)%varPt
  monthlyArray = stack(topOfStack)%values
ELSE
  CALL ShowWarningError('UtilityCost:Tariff: stack underflow in calculation of utility bills. On variable: ' &
                        // TRIM(econVar(variablePointer)%name))
  variablePointer = 0
  monthlyArray = 0.0d0
  topOfStack = 0
END IF
topOfStack = topOfStack - 1
END SUBROUTINE popStack