C Library Functions  - get (3)

NAME

get(3f) - [M_list::dictionary::OOPS] get value of key-value pair in a dictionary given key (LICENSE:PD)

CONTENTS

Synopsis
Description
Options
Examples
Author
License

SYNOPSIS

type(dictionary) :: dict

   character(len=*),intent(in) :: key
   character(len=*),intent(in) :: VALUE

value=dict%get(key)

DESCRIPTION

get a value given a key from a key-value dictionary

If key is not found in dictionary , return a blank

OPTIONS

DICT is the dictionary.
KEY key name
VALUE value associated with key

EXAMPLES

Sample program:

    program demo_get
    use M_list, only : dictionary
    implicit none
    type(dictionary)             :: table
    character(len=:),allocatable :: val
    integer                      :: i

call 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

Results

      >  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=

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 get (3) July 22, 2023
Generated by manServer 1.08 from 2180a63d-637a-4c58-aaae-8f7e9b9e7298 using man macros.