gtool5 Fortran 90/95 Library 1.0.0-rc5
日本語
Loading...
Searching...
No Matches
dc_hash::dchashnext Interface Reference

Public Member Functions

subroutine dchashnext0 (hashv, key, value, end)

Detailed Description

Definition at line 210 of file dc_hash.f90.

Member Function/Subroutine Documentation

◆ dchashnext0()

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

Get next key-value pair from hash

Returns the contents of hashv to key and value. See DCHashRewind for details.

Parameters
[in,out]hashvHash variable
[out]keyKey string
[out]valueValue string (optional)
[out]endReturns .true. if all entries have been traversed

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: