Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(inout) | :: | iNumberOfRecords | |||
integer, | intent(inout) | :: | iNumberOfDefaultedFields | |||
integer, | intent(inout) | :: | iTotalFieldsWithDefaults | |||
integer, | intent(inout) | :: | iNumberOfAutosizedFields | |||
integer, | intent(inout) | :: | iTotalAutoSizableFields | |||
integer, | intent(inout) | :: | iNumberOfAutoCalcedFields | |||
integer, | intent(inout) | :: | iTotalAutoCalculatableFields |
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 GetIDFRecordsStats(iNumberOfRecords,iNumberOfDefaultedFields,iTotalFieldsWithDefaults, &
iNumberOfAutosizedFields,iTotalAutoSizableFields, &
iNumberOfAutoCalcedFields,iTotalAutoCalculatableFields)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN February 2009
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This routine provides some statistics on the current IDF, such as number of records, total fields with defaults,
! number of fields that overrode the default (even if it was default value), and similarly for Autosize.
! METHODOLOGY EMPLOYED:
! Traverses the IDF Records looking at each field vs object definition for defaults and autosize.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
INTEGER, INTENT(INOUT) :: iNumberOfRecords ! Number of IDF Records
INTEGER, INTENT(INOUT) :: iNumberOfDefaultedFields ! Number of defaulted fields in IDF
INTEGER, INTENT(INOUT) :: iTotalFieldsWithDefaults ! Total number of fields that could be defaulted
INTEGER, INTENT(INOUT) :: iNumberOfAutosizedFields ! Number of autosized fields in IDF
INTEGER, INTENT(INOUT) :: iTotalAutoSizableFields ! Total number of autosizeable fields
INTEGER, INTENT(INOUT) :: iNumberOfAutoCalcedFields ! Total number of autocalculate fields
INTEGER, INTENT(INOUT) :: iTotalAutoCalculatableFields ! Total number of autocalculatable fields
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: iRecord
INTEGER :: iField
INTEGER :: iObjectDef
iNumberOfRecords=NumIDFRecords
iNumberOfDefaultedFields =0
iTotalFieldsWithDefaults =0
iNumberOfAutosizedFields =0
iTotalAutoSizableFields =0
iNumberOfAutoCalcedFields =0
iTotalAutoCalculatableFields =0
DO iRecord=1,NumIDFRecords
IF (IDFRecords(iRecord)%ObjectDefPtr <= 0 .or. IDFRecords(iRecord)%ObjectDefPtr > NumObjectDefs) CYCLE
iObjectDef=IDFRecords(iRecord)%ObjectDefPtr
DO iField=1,IDFRecords(iRecord)%NumAlphas
IF (ObjectDef(iObjectDef)%AlphFieldDefs(iField) /= Blank) iTotalFieldsWithDefaults=iTotalFieldsWithDefaults+1
IF (ObjectDef(iObjectDef)%AlphFieldDefs(iField) /= Blank .and. IDFRecords(iRecord)%AlphBlank(iField)) &
iNumberOfDefaultedFields=iNumberOfDefaultedFields+1
ENDDO
DO iField=1,IDFRecords(iRecord)%NumNumbers
IF (ObjectDef(iObjectDef)%NumRangeChks(iField)%DefaultChk) iTotalFieldsWithDefaults=iTotalFieldsWithDefaults+1
IF (ObjectDef(iObjectDef)%NumRangeChks(iField)%DefaultChk .and. IDFRecords(iRecord)%NumBlank(iField)) &
iNumberOfDefaultedFields=iNumberOfDefaultedFields+1
IF (ObjectDef(iObjectDef)%NumRangeChks(iField)%AutoSizable) iTotalAutoSizableFields=iTotalAutoSizableFields+1
IF (ObjectDef(iObjectDef)%NumRangeChks(iField)%AutoSizable .and. &
IDFRecords(iRecord)%Numbers(iField) == ObjectDef(iObjectDef)%NumRangeChks(iField)%AutoSizeValue) &
iNumberOfAutosizedFields=iNumberOfAutosizedFields+1
IF (ObjectDef(iObjectDef)%NumRangeChks(iField)%AutoCalculatable) iTotalAutoCalculatableFields=iTotalAutoCalculatableFields+1
IF (ObjectDef(iObjectDef)%NumRangeChks(iField)%AutoCalculatable .and. &
IDFRecords(iRecord)%Numbers(iField) == ObjectDef(iObjectDef)%NumRangeChks(iField)%AutoCalculateValue) &
iNumberOfAutoCalcedFields=iNumberOfAutoCalcedFields+1
ENDDO
ENDDO
RETURN
END SUBROUTINE GetIDFRecordsStats