is_repeat_count Function

private pure function is_repeat_count(word) result(yes)

True if word looks like N*value (integer, then ‘*’).

Arguments

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

Return Value logical


Called by

proc~~is_repeat_count~~CalledByGraph proc~is_repeat_count is_repeat_count proc~check_unsupported check_unsupported proc~check_unsupported->proc~is_repeat_count proc~collect_tokens collect_tokens proc~collect_tokens->proc~check_unsupported proc~parse_group_body parse_group_body proc~parse_group_body->proc~collect_tokens proc~dispatch_group dispatch_group proc~dispatch_group->proc~parse_group_body proc~parse_from_lines parse_from_lines proc~parse_from_lines->proc~dispatch_group

Variables

Type Visibility Attributes Name Initial
character(len=1), private :: c
integer, private :: i
integer, private :: star

Source Code

   pure function is_repeat_count(word) result(yes)
      !! True if `word` looks like `N*value` (integer, then '*').
      character(len=*), intent(in) :: word
      logical :: yes
      integer :: star, i
      character :: c
      yes = .false.
      star = index(word, "*")
      if (star <= 1) return
      do i = 1, star - 1
         c = word(i:i)
         if (c < "0" .or. c > "9") return
      end do
      yes = .true.
   end function is_repeat_count