Closed jiangleads closed 2 months ago
Hi, yes this is possible using the optional status variable:
program test
use fhash, only: fhash_tbl_t, key=>fhash_key
implicit none
integer :: istation, status
type(fhash_tbl_t) :: tbl
call tbl%get(key("NONE"),istation,stat=status)
if (status /= 0) then
Print*, "Key not found"
else
print*,istation
end if
end program
Hi, yes this is possible using the optional status variable:
program test use fhash, only: fhash_tbl_t, key=>fhash_key implicit none integer :: istation, status type(fhash_tbl_t) :: tbl call tbl%get(key("NONE"),istation,stat=status) if (status /= 0) then Print*, "Key not found" else print*,istation end if end program
Hello, Thank you for your reply! That is great! Awsome :)
Hello, I had build this cod under Intel Compile. Everything is ok except it do not report error when the keys are not in the dictionary. Can it report error when the keys are not in dictionary? the codes are below: