Returns ID of label in entries array. Returns 0 if label not found.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(parser_obj), | intent(in) | :: | this |
Parser object |
||
| character(len=*), | intent(in) | :: | label |
label to look for |
pure function parser_obj_FetchLabelID(this,label) result(id) !> Returns ID of label in entries array. ! Returns 0 if label not found. implicit none class(parser_obj), intent(in) :: this !! Parser object character(*), intent(in) :: label !! label to look for ! Work variables integer :: id integer :: n ! Initialize ID at zero (not found) id=0 if (allocated(this%entries)) then do n=1,size(this%entries) if (trim(adjustl(this%entries(n)%label)).eq.trim(adjustl(label))) then id=n return end if end do end if return end function parser_obj_FetchLabelID