@@ -136,7 +136,7 @@ opaque. Their current representations are as follows
136
136
end type other_type
137
137
```
138
138
139
- The module also defines six procedures for those types: ` copy_key ` ,
139
+ The module also defines six procedures for those types: ` copy_key ` ,
140
140
` copy_other ` , ` equal_keys ` , ` free_key ` , ` free_other ` , ` get ` , and
141
141
` set ` , and one operator, ` == ` ,
142
142
for use by the hash maps to manipulate or inquire of components of
@@ -210,18 +210,18 @@ Returns a copy of an input of type `key_type`.
210
210
211
211
##### Syntax
212
212
213
- ` call [[stdlib_hashmap_wrappers:copy_key]]( key_in, key_out ) `
213
+ ` call [[stdlib_hashmap_wrappers:copy_key]]( old_key, new_key ) `
214
214
215
215
##### Class
216
216
217
217
Subroutine.
218
218
219
219
##### Arguments
220
220
221
- ` key_in ` : shall be a scalar expression of type ` key_type ` . It
221
+ ` old_key ` : shall be a scalar expression of type ` key_type ` . It
222
222
is an ` intent(in) ` argument.
223
223
224
- ` key_out ` : shall be a scalar variable of type ` key_type ` . It
224
+ ` new_key ` : shall be a scalar variable of type ` key_type ` . It
225
225
is an ` intent(out) ` argument.
226
226
227
227
##### Example
@@ -233,11 +233,11 @@ is an `intent(out)` argument.
233
233
use iso_fortran_env, only: int8
234
234
implicit none
235
235
integer(int8) :: i, value(15)
236
- type(key_type) :: key_in, key_out
236
+ type(key_type) :: old_key, new_key
237
237
value = [(i, i = 1, 15)]
238
238
call set( key_in, value )
239
- call copy_key( key_in, key_out )
240
- print *, "key_in == key_out = ", key_in == key_out
239
+ call copy_key( old_key, new_key )
240
+ print *, "old_key == new_key = ", old_key == new_key
241
241
end program demo_copy_key
242
242
```
243
243
@@ -637,7 +637,7 @@ pointers intended for use as a hash function for the hash maps.
637
637
hasher_pointer => fnv_1a_hasher
638
638
array1 = [ 5_int8, 4_int8, 3_int8, 1_int8, 10_int8, 4_int8 ]
639
639
call set( key, array1 )
640
- hash = hassher_pointer (key)
640
+ hash = hasher_pointer (key)
641
641
print *, hash
642
642
end program demo_hasher_fun
643
643
```
@@ -913,10 +913,16 @@ is an `intent(out)` argument.
913
913
is an ` intent(out) ` argument.
914
914
915
915
` value ` : if the first argument is ` key ` ` value ` shall be a default
916
- character string expression, or a vector expression of type integer
916
+ character string scalar expression, or a vector expression of type integer
917
917
and kind ` int8 ` , while for a first argument of type ` other ` ` value `
918
918
shall be of type ` class(*) ` . It is an ` intent(in) ` argument.
919
919
920
+ ##### Note
921
+
922
+ Values of types other than a scalar default character or an
923
+ ` INT8 ` vector can be used as the basis of a ` key ` by transferring the
924
+ value to an ` INT8 ` vector.
925
+
920
926
##### Example
921
927
922
928
``` fortran
0 commit comments