don't use intrinsic names of keywors as function names
This commit is contained in:
parent
b58489c1c2
commit
adefbd95e6
|
@ -24,8 +24,8 @@ module config
|
||||||
procedure :: add => add
|
procedure :: add => add
|
||||||
procedure :: show => show
|
procedure :: show => show
|
||||||
|
|
||||||
procedure :: keyExists => exist
|
procedure :: keyExists => keyExists
|
||||||
procedure :: countKeys => count
|
procedure :: countKeys => countKeys
|
||||||
|
|
||||||
procedure :: getFloat => getFloat
|
procedure :: getFloat => getFloat
|
||||||
procedure :: getFloats => getFloats
|
procedure :: getFloats => getFloats
|
||||||
|
@ -305,7 +305,7 @@ end subroutine show
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief reports wether a given key (string value at first position) exists in the list
|
!> @brief reports wether a given key (string value at first position) exists in the list
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
logical function exist(this,key)
|
logical function keyExists(this,key)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
|
|
||||||
|
@ -314,22 +314,22 @@ logical function exist(this,key)
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
|
|
||||||
exist = .false.
|
keyExists = .false.
|
||||||
|
|
||||||
item => this%next
|
item => this%next
|
||||||
do while (associated(item) .and. .not. exist)
|
do while (associated(item) .and. .not. keyExists)
|
||||||
exist = trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)
|
keyExists = trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)
|
||||||
item => item%next
|
item => item%next
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end function exist
|
end function keyExists
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief count number of key appearances
|
!> @brief count number of key appearances
|
||||||
!> @details traverses list and counts each occurrence of specified key
|
!> @details traverses list and counts each occurrence of specified key
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
integer(pInt) function count(this,key)
|
integer(pInt) function countKeys(this,key)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
IO_stringValue
|
IO_stringValue
|
||||||
|
|
||||||
|
@ -339,21 +339,20 @@ integer(pInt) function count(this,key)
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
|
|
||||||
count = 0_pInt
|
countKeys = 0_pInt
|
||||||
|
|
||||||
item => this%next
|
item => this%next
|
||||||
do while (associated(item))
|
do while (associated(item))
|
||||||
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) &
|
if (trim(IO_stringValue(item%string%val,item%string%pos,1)) == trim(key)) &
|
||||||
count = count + 1_pInt
|
countKeys = countKeys + 1_pInt
|
||||||
item => item%next
|
item => item%next
|
||||||
end do
|
end do
|
||||||
|
|
||||||
end function count
|
end function countKeys
|
||||||
|
|
||||||
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
!> @brief returns all strings in the list
|
!> @brief DEPRECATED: REMOVE SOON
|
||||||
!> @details returns raw string without start/end position of chunks
|
|
||||||
!--------------------------------------------------------------------------------------------------
|
!--------------------------------------------------------------------------------------------------
|
||||||
function strings(this)
|
function strings(this)
|
||||||
use IO, only: &
|
use IO, only: &
|
||||||
|
@ -624,7 +623,7 @@ function getFloats(this,key,defaultVal)
|
||||||
real(pReal), dimension(:), allocatable :: getFloats
|
real(pReal), dimension(:), allocatable :: getFloats
|
||||||
class(tPartitionedStringList), intent(in) :: this
|
class(tPartitionedStringList), intent(in) :: this
|
||||||
character(len=*), intent(in) :: key
|
character(len=*), intent(in) :: key
|
||||||
integer(pInt), dimension(:), intent(in), optional :: defaultVal
|
real(pReal), dimension(:), intent(in), optional :: defaultVal
|
||||||
type(tPartitionedStringList), pointer :: item
|
type(tPartitionedStringList), pointer :: item
|
||||||
integer(pInt) :: i
|
integer(pInt) :: i
|
||||||
logical :: found, &
|
logical :: found, &
|
||||||
|
|
Loading…
Reference in New Issue