Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | KeyedValue | |||
character(len=*), | intent(in) | :: | VariableName |
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.
FUNCTION FindItemInVariableList(KeyedValue,VariableName) RESULT(InVariableList)
! FUNCTION INFORMATION:
! AUTHOR Linda Lawrie
! DATE WRITTEN July 2010
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! This function looks up a key and variable name value and determines if they are
! in the list of required variables for a simulation.
! METHODOLOGY EMPLOYED:
! na
! REFERENCES:
! na
! USE STATEMENTS:
! na
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: KeyedValue
CHARACTER(len=*), INTENT(IN) :: VariableName
LOGICAL :: InVariableList
! FUNCTION PARAMETER DEFINITIONS:
! na
! INTERFACE BLOCK SPECIFICATIONS:
! na
! DERIVED TYPE DEFINITIONS:
! na
! FUNCTION LOCAL VARIABLE DECLARATIONS:
INTEGER :: Found
INTEGER :: Item
InVariableList=.false.
Found=0
DO Item=1,NumConsideredOutputVariables
IF (.not. DOSameString(VariableName,OutputVariablesForSimulation(Item)%VarName)) CYCLE
Found=Item
EXIT
ENDDO
IF (Found /= 0) THEN
IF (DOSameString(KeyedValue,OutputVariablesForSimulation(Found)%Key) .or. &
OutputVariablesForSimulation(Found)%Key == '*') THEN
InVariableList=.true.
ELSE
DO WHILE (Found /= 0)
Found=OutputVariablesForSimulation(Found)%Next
IF (Found /= 0) THEN
IF (DOSameString(KeyedValue,OutputVariablesForSimulation(Found)%Key) .or. &
OutputVariablesForSimulation(Found)%Key == '*') THEN
InVariableList=.true.
EXIT
ENDIF
ENDIF
ENDDO
ENDIF
ENDIF
RETURN
END FUNCTION FindItemInVariableList