Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | reportIndex | |||
character(len=*), | intent(in) | :: | subTableName |
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.
INTEGER FUNCTION newPreDefSubTable(reportIndex,subTableName)
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer
! DATE WRITTEN August 2006
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Assigns the index for predefined sub-tables
! METHODOLOGY EMPLOYED:
! Simple assignments to public variables.
! REFERENCES:
! na
! USE STATEMENTS:
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER,INTENT(IN) :: reportIndex
CHARACTER(len=*),INTENT(IN) :: subTableName
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
IF (.NOT. ALLOCATED(subTable)) THEN
ALLOCATE(subTable(sizeIncrement))
sizeSubTable = sizeIncrement
numSubTable = 1
ELSE
numSubTable = numSubTable + 1
! if larger then current size then make a temporary array of the same
! type and put stuff into it while reallocating the main array
IF (numSubTable .GT. sizeSubTable) THEN
ALLOCATE(subTableCopy(sizeSubTable))
subTableCopy = subTable
DEALLOCATE(subTable)
ALLOCATE(subTable(sizeSubTable + sizeIncrement))
subTable(1:sizeSubTable) = subTableCopy
DEALLOCATE(subTableCopy)
sizeSubTable = sizeSubTable + sizeIncrement
END IF
END IF
! initialize new record)
subTable(numSubTable)%name = subTableName
subTable(numSubTable)%indexReportName = reportIndex
newPreDefSubTable = numSubTable
END FUNCTION newPreDefSubTable