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) | :: | VariableName | |||
integer, | intent(in) | :: | StackNum | |||
type(ErlValueType), | intent(in), | optional | :: | 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.
FUNCTION NewEMSVariable(VariableName, StackNum, Value) RESULT(VariableNum)
! FUNCTION INFORMATION:
! AUTHOR Peter Graham Ellis
! DATE WRITTEN June 2006
! MODIFIED na
! RE-ENGINEERED na
! PURPOSE OF THIS FUNCTION:
! Creates new variable if it doesn't exist. If exists, returns existing variable number.
! METHODOLOGY EMPLOYED:
!
! USE STATEMENTS:
USE InputProcessor, ONLY: MakeUpperCase
IMPLICIT NONE ! Enforce explicit typing of all variables in this routine
! FUNCTION ARGUMENT DEFINITIONS:
CHARACTER(len=*), INTENT(IN) :: VariableName
INTEGER, INTENT(IN) :: StackNum
TYPE(ErlValueType), INTENT(IN), OPTIONAL :: Value
INTEGER :: VariableNum
! FUNCTION LOCAL VARIABLE DECLARATIONS:
TYPE(ErlVariableType), DIMENSION(:), ALLOCATABLE :: TempErlVariable
! FLOW:
VariableNum = FindEMSVariable(VariableName, StackNum)
IF (VariableNum == 0) THEN ! Variable does not exist anywhere yet
IF (NumErlVariables == 0) THEN
ALLOCATE(ErlVariable(1))
NumErlVariables = 1
ELSE
! Extend the variable array
ALLOCATE(TempErlVariable(NumErlVariables))
TempErlVariable = ErlVariable
DEALLOCATE(ErlVariable)
ALLOCATE(ErlVariable(NumErlVariables + 1))
ErlVariable(1:NumErlVariables) = TempErlVariable(1:NumErlVariables)
DEALLOCATE(TempErlVariable)
NumErlVariables = NumErlVariables + 1
END IF
! Add the new variable
VariableNum = NumErlVariables
ErlVariable(VariableNum)%Name = MakeUpperCase(VariableName)
ErlVariable(VariableNum)%StackNum = StackNum
ErlVariable(VariableNum)%Value%Type = ValueNumber ! ErlVariable values are numbers
END IF
IF (PRESENT(Value)) ErlVariable(VariableNum)%Value = Value
RETURN
END FUNCTION NewEMSVariable