Skip to content

Commit 21c9fc4

Browse files
committed
Corrected the use of set for keys in examples
Change the use of set for keys in several examples, e.g., the output key was sometimes called key_in and the set procedure was sometimes called set_key. [ticket: X]
1 parent 5d6741d commit 21c9fc4

File tree

1 file changed

+12
-12
lines changed

1 file changed

+12
-12
lines changed

doc/specs/stdlib_hashmaps.md

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -229,14 +229,14 @@ is an `intent(out)` argument.
229229
```fortran
230230
program demo_copy_key
231231
use stdlib_hashmap_wrappers, only: &
232-
copy_key, operator(==)equal_keys, key_type
232+
copy_key, operator(==), equal_keys, key_type
233233
use iso_fortran_env, only: int8
234234
implicit none
235235
integer(int8) :: i, value(15)
236236
type(key_type) :: old_key, new_key
237237
value = [(i, i = 1, 15)]
238-
call set( key_in, value )
239-
call copy_key( old_key, new_key )
238+
call set( key_out, value )
239+
call copy_key( key_out, new_key )
240240
print *, "old_key == new_key = ", old_key == new_key
241241
end program demo_copy_key
242242
```
@@ -470,11 +470,11 @@ is an `intent(out)` argument.
470470
use iso_fortran_env, only: int8
471471
implicit none
472472
integer(int8) :: i, value(15)
473-
type(key_type) :: key_in, key_out
473+
type(key_type) :: old_key, new_key
474474
value = [(i, i=1, 15)]
475-
call set( key_in, value )
476-
call copy_key( key_in, key_out )
477-
call free_key( key_out )
475+
call set( old_key, value )
476+
call copy_key( old_key, new_key )
477+
call free_key( old_key )
478478
end program demo_free_key
479479
```
480480

@@ -685,13 +685,13 @@ The result is `.true.` if the keys are equal, otherwise `.falss.`.
685685
use iso_fortran_env, only: int8
686686
implicit none
687687
integer(int8) :: i, value(15)
688-
type(key_type) :: key_in, key_out
688+
type(key_type) :: old_key, new_key
689689
do i=1, 15
690690
value(i) = i
691691
end do
692-
call set( key_in, value )
693-
call copy_key( key_in, key_out )
694-
print *, "key_in == key_out = ", key_in == key_out
692+
call set( old_key, value )
693+
call copy_key( old_key, new_key )
694+
print *, "old_key == new_key = ", old_key == new_key
695695
end program demo_equal_keys
696696
```
697697

@@ -1610,7 +1610,7 @@ is being examined.
16101610
type(key_type) :: key
16111611
logocal :: present
16121612
call map % init( fnv_1_hasher )
1613-
call set_key(key, [0_int8, 1_int8] )
1613+
call set(key, [0_int8, 1_int8] )
16141614
call map % key_test ( key, present )
16151615
print *, "Initial key of 10 present for empty map = ", present
16161616
end program demo_key_test

0 commit comments

Comments
 (0)