is_function_line Function

private pure function is_function_line(line) result(res)

Check if a line is a function coefficient line (starts with a number)

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: line

Return Value logical


Called by

proc~~is_function_line~~CalledByGraph proc~is_function_line is_function_line proc~classify_line classify_line proc~classify_line->proc~is_function_line proc~count_shells_for_element count_shells_for_element proc~count_shells_for_element->proc~classify_line proc~fill_element_basis fill_element_basis proc~fill_element_basis->proc~classify_line proc~parse_element_basis parse_element_basis proc~parse_element_basis->proc~count_shells_for_element proc~parse_element_basis->proc~fill_element_basis proc~build_molecular_basis build_molecular_basis proc~build_molecular_basis->proc~parse_element_basis

Variables

Type Visibility Attributes Name Initial
character(len=1), private :: first_char

Source Code

   pure function is_function_line(line) result(res)
      !! Check if a line is a function coefficient line (starts with a number)
      character(len=*), intent(in) :: line
      logical :: res
      character(len=1) :: first_char

      if (len_trim(line) == 0) then
         res = .false.
         return
      end if

      first_char = line(1:1)
      res = (first_char >= '0' .and. first_char <= '9')
   end function is_function_line