IsVariable Function

private function IsVariable(varlen, eqChar, variables, nvariables)

Arguments

TypeIntentOptionalAttributesName
integer, intent(inout) :: varlen
character, intent(in) :: eqChar
type(IndepVar) :: variables(1:nvariables)
integer :: nvariables

Return Value logical


Contents

Source Code


Source Code

  logical function IsVariable(varlen,eqChar,variables,nvariables)
    integer,intent(inout) :: varlen
    character(*),intent(in) :: eqChar
    integer      :: nvariables
    type(IndepVar) :: variables(1:nvariables)
    ! Local
    integer :: i

    IsVariable = .false.
    varlen = 0
    if(any(separators(:) == eqChar(1:1))) return
    if(verify(eqChar(1:1),'0123456789') == 0) return

    do i = 1,nvariables

      if(index(eqChar,variables(i)%value) == 1) then
        IsVariable = .true.

        if(len(variables(i)%value) > varlen) then
          varlen = len(variables(i)%value)
        endif
      endif
    enddo
  endfunction IsVariable