Check data consistency.
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(command_line_arguments_group), | intent(inout) | :: | self |
CLAsG data. |
||
character(len=*), | intent(in), | optional | :: | pref |
Prefixing string. |
subroutine check(self, pref) !< Check data consistency. class(command_line_arguments_group), intent(inout) :: self !< CLAsG data. character(*), optional, intent(in) :: pref !< Prefixing string. integer(I4P) :: a !< Counter. integer(I4P) :: aa !< Counter. ! verify if CLAs switches are unique CLA_unique: do a=1, self%Na if (.not.self%cla(a)%is_positional) then do aa=1, self%Na if ((a/=aa).and.(.not.self%cla(aa)%is_positional)) then if ((self%cla(a)%switch==self%cla(aa)%switch ).or.(self%cla(a)%switch_ab==self%cla(aa)%switch ).or.& (self%cla(a)%switch==self%cla(aa)%switch_ab).or.(self%cla(a)%switch_ab==self%cla(aa)%switch_ab)) then call self%errored(pref=pref, error=ERROR_CONSISTENCY, a1=a, a2=aa) exit CLA_unique endif endif enddo endif enddo CLA_unique ! update mutually exclusive relations CLA_exclude: do a=1, self%Na if (.not.self%cla(a)%is_positional) then if (self%cla(a)%m_exclude/='') then if (self%is_defined(switch=self%cla(a)%m_exclude, pos=aa)) then self%cla(aa)%m_exclude = self%cla(a)%switch endif endif endif enddo CLA_exclude endsubroutine check