Bitwise 'OR' over two 1D integer array of kind 4
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
integer(kind=4), | intent(in), | dimension(:) | :: | a | ||
integer(kind=4), | intent(in), | dimension(:) | :: | b |
function int4_1D_or_int4_1D(a, b) result(r)
!< Bitwise 'OR' over two 1D integer array of kind 4
implicit none
integer(kind=4), dimension(:), intent(in) :: a
integer(kind=4), dimension(:), intent(in) :: b
integer(kind=4), dimension(size(a)) :: r
if (size(a) /= size(b)) then
print *, "Error: Sizes of arrays being 'or'ed should be the same."
stop
end if
r = ior(a, b)
end function int4_1D_or_int4_1D