File: example_hashmaps_free_key.f90

package info (click to toggle)
fortran-stdlib 0.8.1-1
  • links: PTS, VCS
  • area: main
  • in suites: sid
  • size: 34,008 kB
  • sloc: f90: 24,178; ansic: 1,244; cpp: 623; python: 119; makefile: 13
file content (12 lines) | stat: -rw-r--r-- 361 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
program example_free_key
  use stdlib_hashmap_wrappers, only: &
    copy_key, free_key, key_type, set
  use iso_fortran_env, only: int8
  implicit none
  integer(int8) :: i, value(15)
  type(key_type) :: old_key, new_key
  value = [(i, i=1, 15)]
  call set(old_key, value)
  call copy_key(old_key, new_key)
  call free_key(old_key)
end program example_free_key