@@ -25,7 +25,11 @@ Turn a logical mask into an index array by selecting all true values.
2525
2626#### Syntax
2727
28- ` call [[trueloc(function)]] (array[, lbound]) `
28+ ` loc = [[trueloc(function)]] (array[, lbound]) `
29+
30+ #### Class
31+
32+ Pure function.
2933
3034#### Arguments
3135
@@ -40,14 +44,14 @@ Returns an array of default integer size, with a maximum length of `size(array)`
4044#### Examples
4145
4246``` fortran
43- program demo
47+ program demo_trueloc
4448 use stdlib_array, only : trueloc
4549 implicit none
4650 real, allocatable :: array(:)
4751 allocate(array(500))
4852 call random_number(array)
4953 array(trueloc(array > 0.5)) = 0.0
50- end program demo
54+ end program demo_trueloc
5155```
5256
5357
@@ -63,7 +67,11 @@ Turn a logical mask into an index array by selecting all false values.
6367
6468#### Syntax
6569
66- ` call [[falseloc(function)]] (array[, lbound]) `
70+ ` loc = [[falseloc(function)]] (array[, lbound]) `
71+
72+ #### Class
73+
74+ Pure function.
6775
6876#### Arguments
6977
@@ -78,12 +86,12 @@ Returns an array of default integer size, with a maximum length of `size(array)`
7886#### Examples
7987
8088``` fortran
81- program demo
89+ program demo_falseloc
8290 use stdlib_array, only : falseloc
8391 implicit none
8492 real, allocatable :: array(:)
8593 allocate(array(-200:200))
8694 call random_number(array)
8795 array(falseloc(array < 0.5), lbound(array)) = 0.0
88- end program demo
96+ end program demo_falseloc
8997```
0 commit comments