Nodes of different colours represent the following:
Solid arrows point from a parent (sub)module to the submodule which is descended from it. Dashed arrows point from a module being used to the module or program unit using it. Where possible, edges connecting nodes are given different colours to make them easier to distinguish in large graphs.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | String | |||
integer, | intent(out) | :: | PMonth | |||
integer, | intent(out) | :: | PDay | |||
integer, | intent(out) | :: | PWeekDay | |||
integer, | intent(out) | :: | DateType | |||
logical, | intent(inout) | :: | ErrorsFound | |||
integer, | intent(out), | optional | :: | PYear |
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 ProcessDateString(String,PMonth,PDay,PWeekDay,DateType,ErrorsFound,PYear)
! SUBROUTINE INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN December 1999
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS SUBROUTINE:
! This subroutine will process a date from a string and determine
! the proper month and day for that date string.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
USE InputProcessor, ONLY: ProcessNumber
USE DataStringGlobals
USE DataInterfaces, ONLY: ShowSevereError
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! SUBROUTINE ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: String
INTEGER, INTENT(OUT) :: PMonth
INTEGER, INTENT(OUT) :: PDay
INTEGER, INTENT(OUT) :: PWeekDay
INTEGER, INTENT(OUT) :: DateType ! DateType found (-1=invalid, 1=month/day, 2=nth day in month, 3=last day in month)
LOGICAL, INTENT(INOUT) :: ErrorsFound
INTEGER, INTENT(OUT), OPTIONAL :: PYear
! SUBROUTINE PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! SUBROUTINE LOCAL VARIABLE DECLARATIONS:
INTEGER FstNum
LOGICAL ErrFlag
INTEGER NumTokens
INTEGER TokenDay
INTEGER TokenMonth
INTEGER TokenWeekDay
INTEGER TokenYear
FstNum=INT(ProcessNumber(String,ErrFlag))
DateType=-1
IF (.not. ErrFlag) THEN
! Entered single number, do inverse JDay
IF (FstNum == 0) THEN
PMonth=0
PDay=0
DateType=1
ELSEIF (FstNum < 0 .or. FstNum > 366) THEN
CALL ShowSevereError('Invalid Julian date Entered='//TRIM(String))
ErrorsFound=.true.
ELSE
CALL InvJulianDay(FstNum,PMonth,PDay,0)
DateType=1
ENDIF
ELSE
! Error when processing as number, try x/x
IF (.not. PRESENT(PYear)) THEN
CALL DetermineDateTokens(String,NumTokens,TokenDay,TokenMonth,TokenWeekDay,DateType,ErrorsFound)
ELSE
CALL DetermineDateTokens(String,NumTokens,TokenDay,TokenMonth,TokenWeekDay,DateType,ErrorsFound,TokenYear)
PYear=TokenYear
ENDIF
IF (DateType == 1) THEN
PDay=TokenDay
PMonth=TokenMonth
ELSEIF (DateType == 2 .or. DateType == 3) THEN
! interpret as TokenDay TokenWeekDay in TokenMonth
PDay=TokenDay
PMonth=TokenMonth
PWeekDay=TokenWeekDay
ENDIF
ENDIF
RETURN
END SUBROUTINE ProcessDateString