gtool5 Fortran 90/95 ライブラリ 1.0.0-rc5
English
Loading...
Searching...
No Matches
dc_hash::next Interface Reference

Public Member Functions

subroutine dchashnext0 (hashv, key, value, end)

Detailed Description

Definition at line 241 of file dc_hash.f90.

Member Function/Subroutine Documentation

◆ dchashnext0()

subroutine dc_hash::next::dchashnext0 ( type(hash), intent(inout) hashv,
character(*), intent(out) key,
character(*), intent(out), optional value,
logical, intent(out) end )

ハッシュから次のキーと値のペアを取得

hashv の内容を keyvalue に返します. 詳しくは DCHashRewind を参照してください.

Parameters
[in,out]hashvハッシュ変数
[out]keyキー文字列
[out]value値文字列 (省略可能)
[out]end全エントリを走査し終えた場合に .true. を返す

Definition at line 431 of file dc_hash.f90.

432 implicit none
433 type(HASH), intent(inout) :: hashv
434 character(*), intent(out) :: key
435 character(*), intent(out), optional :: value
436 logical, intent(out) :: end
437 integer :: table_size
438 character(STRING) :: value_tmp
439 continue
440 table_size = dchashnumber(hashv)
441 if (table_size < hashv % search_index) then
442 key = ''
443 value_tmp = ''
444 end = .true.
445 else
446 key = hashv % hash_table(hashv % search_index) % key
447 value_tmp = hashv % hash_table(hashv % search_index) % value
448 end = .false.
449 hashv % search_index = hashv % search_index + 1
450 end if
451 if (present(value)) then
452 value = value_tmp
453 end if
454

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