gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
Public Member Functions | List of all members
dc_hash::get Interface Reference

Public Member Functions

subroutine dchashget0 (hashv, key, value, found)
 

Detailed Description

Definition at line 245 of file dc_hash.f90.

Member Function/Subroutine Documentation

◆ dchashget0()

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

キーを与え, ハッシュ内の関連する値を取得

hashv のキー key に関連する値を value に返します. key に関連する値が存在しない場合は value に 空文字を返します.

found を与えると, key に関連する値が見つからなかった 場合に .false. を返します.

Parameters
[in,out]hashvハッシュ変数
[in]key検索するキー文字列
[out]valueキーに関連する値
[out]foundキーが見つからない場合に .false. を返す (省略可能)

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
種別型パラメタを提供します。
Definition dc_types.f90:55
integer, parameter, public string
文字列を保持する 文字型変数の種別型パラメタ
Definition dc_types.f90:137

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