get(3f) - [M_list::dictionary::OOPS] get value of key-value pair in a dictionary given key (LICENSE:PD)
Synopsis
Description
Options
Examples
Author
License
type(dictionary) :: dict
character(len=*),intent(in) :: key character(len=*),intent(in) :: VALUEvalue=dict%get(key)
get a value given a key from a key-value dictionary
If key is not found in dictionary , return a blank
DICT is the dictionary. KEY key name VALUE value associated with key
Sample program:
program demo_get use M_list, only : dictionary implicit none type(dictionary) :: table character(len=:),allocatable :: val integer :: iResultscall table%set(A,value for A) call table%set(B,value for B) call table%set(C,value for C) call table%set(D,value for D) call table%set(E,value for E) call table%set(F,value for F) call table%set(G,value for G)
write(*,*)A=,table%get(A) write(*,*)B=,table%get(B) write(*,*)C=,table%get(C) write(*,*)D=,table%get(D) write(*,*)E=,table%get(E) write(*,*)F=,table%get(F) write(*,*)G=,table%get(G) write(*,*)H=,table%get(H)
end program demo_get
> A=value for A > B=value for B > C=value for C > D=value for D > E=value for E > F=value for F > G=value for G > H=
John S. Urban
Public Domain
Nemo Release 3.1 | get (3) | February 23, 2025 |