polishing
This commit is contained in:
parent
d765a17f0a
commit
e464f11412
|
@ -583,9 +583,9 @@ function tNode_get_byIndex_asStrings(self,i) result(nodeAsStrings)
|
||||||
end function tNode_get_byIndex_asStrings
|
end function tNode_get_byIndex_asStrings
|
||||||
|
|
||||||
|
|
||||||
!-------------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief Returns the key in a dictionary as a string
|
!> @brief Returns the key in a dictionary as a string
|
||||||
!-------------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function tNode_getKey_byIndex(self,i) result(key)
|
function tNode_getKey_byIndex(self,i) result(key)
|
||||||
|
|
||||||
class(tNode), intent(in), target :: self
|
class(tNode), intent(in), target :: self
|
||||||
|
@ -1169,17 +1169,21 @@ function tList_asStrings(self)
|
||||||
type(tScalar), pointer :: scalar
|
type(tScalar), pointer :: scalar
|
||||||
|
|
||||||
len_max = 0
|
len_max = 0
|
||||||
allocate(character(len=pStringLen) :: tList_asStrings(self%length))
|
item => self%first
|
||||||
|
do i = 1, self%length
|
||||||
|
scalar => item%node%asScalar()
|
||||||
|
len_max = max(len_max, len_trim(scalar%asString()))
|
||||||
|
item => item%next
|
||||||
|
enddo
|
||||||
|
|
||||||
|
allocate(character(len=len_max) :: tList_asStrings(self%length))
|
||||||
item => self%first
|
item => self%first
|
||||||
do i = 1, self%length
|
do i = 1, self%length
|
||||||
scalar => item%node%asScalar()
|
scalar => item%node%asScalar()
|
||||||
tList_asStrings(i) = scalar%asString()
|
tList_asStrings(i) = scalar%asString()
|
||||||
len_max = max(len_max, len_trim(tList_asStrings(i)))
|
|
||||||
item => item%next
|
item => item%next
|
||||||
enddo
|
enddo
|
||||||
|
|
||||||
!ToDo: trim to len_max
|
|
||||||
|
|
||||||
end function tList_asStrings
|
end function tList_asStrings
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue