parser_obj_print Subroutine

private impure subroutine parser_obj_print(this)

Prints all variables found in the parsed file.

Type Bound

parser_obj

Arguments

Type IntentOptional Attributes Name
class(parser_obj), intent(inout) :: this

Parser object


Source Code

  impure subroutine parser_obj_print(this)
    !> Prints all variables found in the parsed file.
    implicit none
    class(parser_obj), intent(inout) :: this                                   !! Parser object
    ! Work variables
    integer           :: n                                                     !! Iterator
    integer           :: l1,l2                                                 !! String lengths
    character(len=80) :: str

    if (allocated(this%entries)) then
      do n=1,size(this%entries)
        l1=len_trim(this%entries(n)%label)
        l2=len_trim(this%entries(n)%value)
        str=this%entries(n)%label(1:l1)//repeat('-',80-l1-l2)//this%entries(n)%value(1:l2)
        write(stdout,"(a80)") str
      end do
    else
      write(stderr,"(a)") "Parser: Entries not allocated"
    end if

    return
  end subroutine parser_obj_print