25 character(len=:),
allocatable :: charstring
48 character(len=*),
intent(in) :: rhs
49 logical :: allocate_charstring
50 allocate_charstring = .false.
51 if (
allocated(lhs%charstring))
then
52 if (len(lhs%charstring) <= len(rhs))
then
53 lhs%charstring(:) = rhs
55 allocate_charstring = .true.
58 allocate_charstring = .true.
60 if (allocate_charstring)
then
66 character(len=*),
intent(out) :: lhs
68 if (
allocated(rhs%charstring))
then
76 character(len=*),
intent(in) :: lhs
79 if (
allocated(rhs%charstring))
then
80 equals = lhs == rhs%charstring
88 character(len=*),
intent(in) :: rhs
90 if (
allocated(lhs%charstring))
then
91 equals = lhs%charstring == rhs
103 if (
allocated(this%charstring))
then
104 equals = (rhs == this%charstring)
111 integer,
intent(in) :: unit
112 integer,
intent(out) :: iostat
113 character(len=*),
intent(inout) :: iomsg
115 if (
allocated(this%charstring))
then
116 write (unit, iostat=iostat) this%charstring
124 if (
allocated(this%charstring))
then
125 length = len(this%charstring)
133 if (
allocated(this%charstring))
deallocate (this%charstring)
elemental logical function charstring_eq_character(lhs, rhs)
recursive subroutine assign_to_charstring(lhs, rhs)
subroutine write_unformatted(this, unit, iostat, iomsg)
elemental logical function character_eq_charstring(lhs, rhs)
subroutine assign_from_charstring(lhs, rhs)
elemental logical function charstring_eq_charstring(this, rhs)
integer function strlen(this)
This class is used to store a single deferred-length character string. It was designed to work in an ...