Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | inReportName | |||
integer, | intent(in) | :: | inNumDigitsShown |
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 AddMonthlyReport(inReportName,inNumDigitsShown)
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer
! DATE WRITTEN August 2008
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Creates a monthly report
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
! na
! SUBROUTINE PARAMETER DEFINITIONS:
CHARACTER(len=*),INTENT(IN) :: inReportName
INTEGER, INTENT(IN) :: inNumDigitsShown
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER, PARAMETER :: SizeAdder = 25
IF (.NOT. ALLOCATED(MonthlyInput)) THEN
ALLOCATE(MonthlyInput(SizeAdder))
sizeMonthlyInput = SizeAdder
MonthlyInputCount = 1
ELSE
MonthlyInputCount = MonthlyInputCount + 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 (MonthlyInputCount .GT. sizeMonthlyInput) THEN
ALLOCATE(MonthlyInputCopy(sizeMonthlyInput))
MonthlyInputCopy = MonthlyInput
DEALLOCATE(MonthlyInput)
ALLOCATE(MonthlyInput(sizeMonthlyInput + SizeAdder))
MonthlyInput(1:sizeMonthlyInput) = MonthlyInputCopy
DEALLOCATE(MonthlyInputCopy)
sizeMonthlyInput = sizeMonthlyInput + SizeAdder
END IF
END IF
! initialize new record
MonthlyInput(MonthlyInputCount)%name = inReportName
MonthlyInput(MonthlyInputCount)%showDigits = inNumDigitsShown
AddMonthlyReport = MonthlyInputCount
END FUNCTION AddMonthlyReport