Fortran hash table  0.1
 All Classes Namespaces Files Functions Variables
test_01.f90
Go to the documentation of this file.
1 
3 
9 
10 program test_01
11  use dictionary_m
12  implicit none
13 
14  type(dictionary_t) :: d
15 
16  call d%init(10)
17 
18  call d%set('one', 'one')
19  call d%set('pi', '3.14159')
20  call d%set('abc', 'first three letters from the alphabet')
21  call d%set('1', 'number one')
22  call d%set('a', 'letter a')
23  call d%set('fortran', 'programming language')
24 
25  write(*,*) 'one', ' = ', d%get('one')
26  write(*,*) 'pi', ' = ', d%get('pi')
27  write(*,*) 'XYZ', ' = ', d%get('XYZ')
28 
29 
30 
31  call d%set('pi', 'pi is the ratio of the perimeter of a circle to its radius')
32 
33  write(*,*) 'pi', ' = ', d%get('pi')
34 
35  write(*,*) 'output from the method show'
36 
37  call d%show()
38 
39 end program test_01
program test_01
Define a dictionary_t object, populate it with keys and values, and list the results with the show me...
Definition: test_01.f90:10
The dictionary contains dict_size buckets (defined at run time)
Dictionary type that uses strings for the keys and values.