Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer, | intent(in) | :: | ScheduleIndex | |||
integer, | intent(in) | :: | Value |
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.
LOGICAL FUNCTION iCheckScheduleValue(ScheduleIndex,Value)
! FUNCTION INFORMATION:
! AUTHOR Linda K. Lawrie
! DATE WRITTEN November 2004
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function checks the indicated schedule value for validity. Uses the ScheduleIndex
! from (GetScheduleIndex).
! METHODOLOGY EMPLOYED:
! This routine is best used with "discrete" schedules. The routine must traverse all values
! in the schedule and compares by equality.
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
INTEGER, INTENT(IN) :: ScheduleIndex ! Which Schedule being tested
INTEGER, INTENT(IN) :: Value ! Actual desired value
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS
! na
! DERIVED TYPE DEFINITIONS
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER Loop ! Loop Control variable
INTEGER DayT ! Day Type Loop control
INTEGER WkSch ! Pointer for WeekSchedule value
iCheckScheduleValue=.false.
IF (ScheduleIndex == -1) THEN
iCheckScheduleValue=(Value == 1)
ELSEIF (ScheduleIndex == 0) THEN
iCheckScheduleValue=(Value == 0)
ELSEIF (ScheduleIndex < 1 .or. ScheduleIndex > NumSchedules) THEN
CALL ShowFatalError('CheckScheduleValue called with ScheduleIndex out of range')
ENDIF
IF (ScheduleIndex > 0) THEN
DayLoop: DO Loop=1,366
WkSch=Schedule(ScheduleIndex)%WeekSchedulePointer(Loop)
DO DayT=1,MaxDayTypes
IF (ANY(DaySchedule(WeekSchedule(WkSch)%DaySchedulePointer(DayT))%TSValue == REAL(Value,r64))) THEN
iCheckScheduleValue=.true.
EXIT DayLoop
ENDIF
ENDDO
ENDDO DayLoop
ENDIF
RETURN
END FUNCTION iCheckScheduleValue