gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_hash::dchashget Interface Reference

Public Member Functions

subroutine dchashget0 (hashv, key, value, found)
 

Detailed Description

Definition at line 214 of file dc_hash.f90.

Member Function/Subroutine Documentation

◆ dchashget0()

subroutine dc_hash::dchashget::dchashget0 ( type(hash), intent(inout)  hashv,
character(*), intent(in)  key,
character(*), intent(out)  value,
logical, intent(out), optional  found 
)

Get associated value from hash with key

Returns the value associated with key in hashv to value. If no value is associated with key, an empty string is returned to value.

If found is given, it returns .false. when no value associated with key is found.

Parameters
[in,out]hashvHash variable
[in]keyKey string to search
[out]valueValue associated with the key
[out]foundReturns .false. if the key is not found (optional)

Definition at line 530 of file dc_hash.f90.

531 use dc_types, only: string
532 implicit none
533 type(HASH), intent(inout) :: hashv
534 character(*), intent(in) :: key
535 character(*), intent(out) :: value
536 logical, intent(out), optional :: found
537 character(STRING) :: search_key, search_value
538 logical :: end
539 continue
540 call dchashrewind(hashv)
541 do
542 call dchashnext(hashv, search_key, search_value, end)
543 if (end) then
544 value = ''
545 if (present(found)) found = .false.
546 exit
547 end if
548
549 if (trim(search_key) == trim(key)) then
550 value = search_value
551 if (present(found)) found = .true.
552 exit
553 end if
554 enddo
555
Provides kind type parameter values.
Definition dc_types.f90:55
integer, parameter, public string
Character length for string
Definition dc_types.f90:137

References dc_types::string.


The documentation for this interface was generated from the following file: