diff --git a/src/stdlib_experimental_optval.f90 b/src/stdlib_experimental_optval.f90 index 3f42fcee3..fc1cf56f5 100644 --- a/src/stdlib_experimental_optval.f90 +++ b/src/stdlib_experimental_optval.f90 @@ -34,7 +34,7 @@ module stdlib_experimental_optval contains - function optval_sp(x, default) result(y) + pure elemental function optval_sp(x, default) result(y) real(sp), intent(in), optional :: x real(sp), intent(in) :: default real(sp) :: y @@ -47,7 +47,7 @@ function optval_sp(x, default) result(y) end function optval_sp - function optval_dp(x, default) result(y) + pure elemental function optval_dp(x, default) result(y) real(dp), intent(in), optional :: x real(dp), intent(in) :: default real(dp) :: y @@ -60,7 +60,7 @@ function optval_dp(x, default) result(y) end function optval_dp - function optval_qp(x, default) result(y) + pure elemental function optval_qp(x, default) result(y) real(qp), intent(in), optional :: x real(qp), intent(in) :: default real(qp) :: y @@ -73,7 +73,7 @@ function optval_qp(x, default) result(y) end function optval_qp - function optval_int8(x, default) result(y) + pure elemental function optval_int8(x, default) result(y) integer(int8), intent(in), optional :: x integer(int8), intent(in) :: default integer(int8) :: y @@ -86,7 +86,7 @@ function optval_int8(x, default) result(y) end function optval_int8 - function optval_int16(x, default) result(y) + pure elemental function optval_int16(x, default) result(y) integer(int16), intent(in), optional :: x integer(int16), intent(in) :: default integer(int16) :: y @@ -99,7 +99,7 @@ function optval_int16(x, default) result(y) end function optval_int16 - function optval_int32(x, default) result(y) + pure elemental function optval_int32(x, default) result(y) integer(int32), intent(in), optional :: x integer(int32), intent(in) :: default integer(int32) :: y @@ -112,7 +112,7 @@ function optval_int32(x, default) result(y) end function optval_int32 - function optval_int64(x, default) result(y) + pure elemental function optval_int64(x, default) result(y) integer(int64), intent(in), optional :: x integer(int64), intent(in) :: default integer(int64) :: y @@ -125,7 +125,7 @@ function optval_int64(x, default) result(y) end function optval_int64 - function optval_logical(x, default) result(y) + pure elemental function optval_logical(x, default) result(y) logical, intent(in), optional :: x logical, intent(in) :: default logical :: y @@ -138,7 +138,7 @@ function optval_logical(x, default) result(y) end function optval_logical - function optval_character(x, default) result(y) + pure function optval_character(x, default) result(y) character(len=*), intent(in), optional :: x character(len=*), intent(in) :: default character(len=:), allocatable :: y