Skip to content

Commit de505f2

Browse files
author
Vandenplas, Jeremie
committed
Update specs for sort_index
1 parent 1c385ff commit de505f2

File tree

2 files changed

+8
-2
lines changed

2 files changed

+8
-2
lines changed

doc/specs/stdlib_sorting.md

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -458,6 +458,12 @@ different on return
458458

459459
##### Examples
460460

461+
Sorting a rank one array with `sort_index`:
462+
463+
```Fortran
464+
{!example/sorting/example_sort_index.f90!}
465+
```
466+
461467
Sorting a related rank one array:
462468

463469
```Fortran
@@ -505,7 +511,7 @@ Sorting an array of a derived type based on the data in one component
505511

506512
```fortran
507513
subroutine sort_a_data( a_data, a, work, index, iwork )
508-
! Sort `a_data` in terms or its component `a`
514+
! Sort `a_data` in terms of its component `a`
509515
type(a_type), intent(inout) :: a_data(:)
510516
integer(int32), intent(inout) :: a(:)
511517
integer(int32), intent(out) :: work(:)

src/stdlib_sorting_sort_index.fypp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ contains
107107
${ti}$, allocatable :: ibuf(:)
108108

109109
if ( size(array, kind=int_index) > huge(1_${ki}$) ) then
110-
error stop "Too many entries for the chosen kind."
110+
error stop "Too many entries for the kind of index."
111111
end if
112112

113113
array_size = size(array, kind=${ki}$)

0 commit comments

Comments
 (0)