Skip to content

Commit 0db0de1

Browse files
committed
fix issues in examples in specs
1 parent b9c9b91 commit 0db0de1

File tree

5 files changed

+98
-98
lines changed

5 files changed

+98
-98
lines changed

doc/specs/stdlib_error.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -77,16 +77,16 @@ program demo_check3
7777
integer :: a = 1
7878
! If a /= 5, prints 'a == 5 failed.', but doesn't stop the program.
7979
call check(a == 5, msg='a == 5 failed.', warn=.true.)
80-
end program demo_check2
80+
end program demo_check3
8181
```
8282
```fortran
83-
program demo_check3
83+
program demo_check4
8484
use stdlib_error, only: check
8585
implicit none
8686
integer :: a = 1
8787
! If a /= 5, stops the program with exit code 77 and prints 'a == 5 failed.'
8888
call check(a == 5, msg='a == 5 failed.', code=77)
89-
end program demo_check3
89+
end program demo_check4
9090
```
9191

9292
### `error_stop` - aborts the program

doc/specs/stdlib_hash_procedures.md

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1016,7 +1016,7 @@ program demo_universal_mult_hash
10161016
hash = universal_mult_hash(source, seed, 6)
10171017
array1(hash) = source
10181018
print *, seed, hash, array1
1019-
end program demo_odd_random_integer
1019+
end program demo_universal_mult_hash
10201020
```
10211021

10221022
#### `water_hash`- calculates a hash code from a key and a seed
@@ -1175,7 +1175,7 @@ E. Knuth. It multiplies the `key` by the odd valued approximation to
11751175
##### Example
11761176

11771177
```fortran
1178-
program demo_fibonacci_hash
1178+
program demo_fibonacci_hash_64
11791179
use stdlib_hash_64bit, only: fibonacci_hash
11801180
use iso_fortran_env, only: int64
11811181
implicit none
@@ -1187,7 +1187,7 @@ program demo_fibonacci_hash
11871187
hash = fibonacci_hash(source, 6)
11881188
array1(hash) = source
11891189
print *, hash
1190-
end program demo_fibonacci_hash
1190+
end program demo_fibonacci_hash_64
11911191
```
11921192

11931193
#### `FNV_1`- calculates a hash code from a key
@@ -1241,7 +1241,7 @@ function for character strings.
12411241
##### Example
12421242

12431243
```fortran
1244-
program demo_fnv_1_hash
1244+
program demo_fnv_1_hash_64
12451245
use stdlib_hash_64bit, only: fnv_1_hash
12461246
use iso_fortran_env, only: int64
12471247
implicit none
@@ -1250,7 +1250,7 @@ program demo_fnv_1_hash
12501250
array1 = [ 5, 4, 3, 1, 10, 4, 9]
12511251
hash = fnv_1_hash(array1)
12521252
print *, hash
1253-
end program demo_fnv_1_hash
1253+
end program demo_fnv_1_hash_64
12541254
```
12551255

12561256

@@ -1304,7 +1304,7 @@ function for character strings.
13041304
##### Example
13051305

13061306
```fortran
1307-
program demo_fnv_1a_hash
1307+
program demo_fnv_1a_hash_64
13081308
use stdlib_hash_64bit, only: fnv_1a_hash
13091309
use iso_fortran_env, only: int64
13101310
implicit none
@@ -1313,7 +1313,7 @@ program demo_fnv_1a_hash
13131313
array1 = [ 5, 4, 3, 1, 10, 4, 9]
13141314
hash = fnv_1a_hash(array1)
13151315
print *, hash
1316-
end program demo_fnv_1a_hash
1316+
end program demo_fnv_1a_hash_64
13171317
```
13181318

13191319

@@ -1596,7 +1596,7 @@ It multiplies the `key` by `seed`, and returns the
15961596

15971597

15981598
```fortran
1599-
program demo_universal_mult_hash
1599+
program demo_universal_mult_hash_64
16001600
use stdlib_hash_32bit, only: odd_random_integer, &
16011601
universal_mult_hash
16021602
use iso_fortran_env, only: int64
@@ -1611,7 +1611,7 @@ program demo_universal_mult_hash
16111611
hash = universal_mult_hash(source, seed, 6)
16121612
array1(hash) = source
16131613
print *, seed, hash, array1
1614-
end program demo_universal_mult_hash
1614+
end program demo_universal_mult_hash_64
16151615
```
16161616

16171617

doc/specs/stdlib_quadrature.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -222,15 +222,15 @@ If not specified, the default integral is -1 to 1.
222222
### Example
223223

224224
```fortran
225-
program integrate
225+
program demo_gauss_legendre
226226
use iso_fortran_env, dp => real64
227227
implicit none
228228
229229
integer, parameter :: N = 6
230230
real(dp), dimension(N) :: x,w
231231
call gauss_legendre(x,w)
232232
print *, "integral of x**2 from -1 to 1 is", sum(x**2 * w)
233-
end program
233+
end program demo_gauss_legendre
234234
```
235235

236236
## `gauss_legendre_lobatto` - Gauss-Legendre-Lobatto quadrature nodes and weights
@@ -268,13 +268,13 @@ If not specified, the default integral is -1 to 1.
268268
### Example
269269

270270
```fortran
271-
program integrate
271+
program demo_gauss_legendre_lobatto
272272
use iso_fortran_env, dp => real64
273273
implicit none
274274
275275
integer, parameter :: N = 6
276276
real(dp), dimension(N) :: x,w
277277
call gauss_legendre_lobatto(x,w)
278278
print *, "integral of x**2 from -1 to 1 is", sum(x**2 * w)
279-
end program
279+
end program demo_gauss_legendre_lobatto
280280
```

0 commit comments

Comments
 (0)