@@ -25,7 +25,11 @@ Turn a logical mask into an index array by selecting all true values.
25
25
26
26
#### Syntax
27
27
28
- ` call [[trueloc(function)]] (array[, lbound]) `
28
+ ` loc = [[trueloc(function)]] (array[, lbound]) `
29
+
30
+ #### Class
31
+
32
+ Pure function.
29
33
30
34
#### Arguments
31
35
@@ -40,14 +44,14 @@ Returns an array of default integer size, with a maximum length of `size(array)`
40
44
#### Examples
41
45
42
46
``` fortran
43
- program demo
47
+ program demo_trueloc
44
48
use stdlib_array, only : trueloc
45
49
implicit none
46
50
real, allocatable :: array(:)
47
51
allocate(array(500))
48
52
call random_number(array)
49
53
array(trueloc(array > 0.5)) = 0.0
50
- end program demo
54
+ end program demo_trueloc
51
55
```
52
56
53
57
@@ -63,7 +67,11 @@ Turn a logical mask into an index array by selecting all false values.
63
67
64
68
#### Syntax
65
69
66
- ` call [[falseloc(function)]] (array[, lbound]) `
70
+ ` loc = [[falseloc(function)]] (array[, lbound]) `
71
+
72
+ #### Class
73
+
74
+ Pure function.
67
75
68
76
#### Arguments
69
77
@@ -78,12 +86,12 @@ Returns an array of default integer size, with a maximum length of `size(array)`
78
86
#### Examples
79
87
80
88
``` fortran
81
- program demo
89
+ program demo_falseloc
82
90
use stdlib_array, only : falseloc
83
91
implicit none
84
92
real, allocatable :: array(:)
85
93
allocate(array(-200:200))
86
94
call random_number(array)
87
95
array(falseloc(array < 0.5), lbound(array)) = 0.0
88
- end program demo
96
+ end program demo_falseloc
89
97
```
0 commit comments