Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | columnIndex | |||
character(len=*), | intent(in) | :: | objName | |||
real(kind=r64), | intent(in) | :: | tableEntryReal | |||
integer, | intent(in), | optional | :: | numSigDigits |
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 RealPreDefTableEntry(columnIndex,objName,tableEntryReal,numSigDigits)
! SUBROUTINE INFORMATION:
! AUTHOR Jason Glazer
! DATE WRITTEN August 2006
! MODIFIED
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! Creates an entry for predefined tables when the entry
! is a real variable
! 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) :: columnIndex
CHARACTER(len=*),INTENT(IN) :: objName
REAL(r64),INTENT(IN) :: tableEntryReal
INTEGER, INTENT(IN),OPTIONAL :: numSigDigits
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER :: sigDigitCount
CHARACTER(len=1) :: digitString
CHARACTER(len=7) :: formatConvert
CHARACTER(len=12) :: stringEntry
INTEGER :: IOS
CALL incrementTableEntry
!check for number of significant digits
IF (PRESENT(numSigDigits)) THEN
IF ((numSigDigits .LE. 9) .AND. (numSigDigits .GE. 0)) THEN
sigDigitCount = numSigDigits
ELSE
sigDigitCount = 2
END IF
ELSE
sigDigitCount = 2
ENDIF
! convert the integer to a string for the number of digits
WRITE(FMT='(I1)', UNIT=digitString) sigDigitCount
! build up the format string
IF (tableEntryReal < 1d10) THEN
formatConvert = '(F12.' // digitString // ')'
ELSE
formatConvert = '(E12.' // digitString // ')'
ENDIF
WRITE(FMT=formatConvert, UNIT=stringEntry,IOSTAT=IOS) tableEntryReal
IF (IOS /= 0) stringEntry=' Too Big'
tableEntry(numTableEntry)%charEntry = stringEntry
tableEntry(numTableEntry)%objectName = objName
tableEntry(numTableEntry)%indexColumn = columnIndex
tableEntry(numTableEntry)%origRealEntry = tableEntryReal
tableEntry(numTableEntry)%significantDigits = sigDigitCount
tableEntry(numTableEntry)%origEntryIsReal = .TRUE.
END SUBROUTINE RealPreDefTableEntry