Skip to content

Commit 1822ccd

Browse files
committed
remove surplus conditions
1 parent 64b1b0e commit 1822ccd

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

src/stdlib_selection.fypp

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -85,9 +85,9 @@ contains
8585
r = size(a, kind=ip)
8686
if(present(right)) r = right
8787

88-
if(k < 1_ip .or. k > size(a, kind=ip) .or. l > r .or. l < 1_ip .or. &
89-
k < l .or. k > r .or. & !i.e. if k is not in the interval [l; r]
90-
r > size(a, kind=ip)) then
88+
if(l > r .or. l < 1_ip .or. r > size(a, kind=ip) &
89+
.or. k < l .or. k > r & !i.e. if k is not in the interval [l; r]
90+
) then
9191
error stop "select must have 1 <= k <= size(a), and 1 <= left <= right <= size(a)";
9292
end if
9393

@@ -202,9 +202,9 @@ contains
202202
error stop "arg_select must have size(a) == size(indx)"
203203
end if
204204

205-
if(k < 1_ip .or. k > size(a, kind=ip) .or. l > r .or. l < 1_ip .or. &
206-
k < l .or. k > r .or. & !i.e. if k is not in the interval [l; r]
207-
r > size(a, kind=ip)) then
205+
if(l > r .or. l < 1_ip .or. r > size(a, kind=ip) &
206+
.or. k < l .or. k > r & !i.e. if k is not in the interval [l; r]
207+
) then
208208
error stop "arg_select must have 1 <= k <= size(a), and 1 <= left <= right <= size(a)";
209209
end if
210210

0 commit comments

Comments
 (0)