IALL(3) - [BIT:LOGICAL] Bitwise and of array elements
result = iall(array [,mask]) | iall(array ,dim [,mask])
integer(kind=KIND) function iall(array,dim,mask)integer(kind=KIND),intent(in) :: array(*) integer(kind=**),intent(in),optional :: dim logical(kind=**),intent(in),optional :: mask(*)
o a kind designated as ** may be any supported kind for the type o ARRAY must be an integer array o MASK is a logical array that conforms to ARRAY of any logical kind. o DIM may be of any integer kind. o The result will by of the same type and kind as ARRAY.
IALL(3) reduces with a bitwise and the elements of ARRAY along dimension DIM if the corresponding element in MASK is .true..
o ARRAY : Shall be an array of type integer o DIM : (Optional) shall be a scalar of type integer with a value in the range from 1 TO N, where N equals the rank of ARRAY. o MASK : (Optional) shall be of type logical and either be a scalar or an array of the same shape as ARRAY.
The result is of the same type as ARRAY.
If DIM is absent, a scalar with the bitwise all of all elements in ARRAY is returned. Otherwise, an array of rank N-1, where N equals the rank of ARRAY, and a shape similar to that of ARRAY with dimension DIM dropped is returned.
Sample program:
program demo_iall use, intrinsic :: iso_fortran_env, only : integer_kinds, & & int8, int16, int32, int64 implicit none integer(kind=int8) :: a(2)Results:a(1) = int(b00100100) a(2) = int(b01101010)
print (b8.8), iall(a)
end program demo_iall
> 00100000
Fortran 2008
IANY(3), IPARITY(3), IAND(3)
Fortran intrinsic descriptions (license: MIT) @urbanjost
Nemo Release 3.1 | iall (3fortran) | November 02, 2024 |