mask - the type of the argument shall be logical and it shall not be scalar.

dim - (optional) dim shall be a scalar integer with a value that lies between one and the rank of mask.

Return value

all(mask) returns a scalar value of type logical where the kind type parameter is the same as the kind type parameter of mask. If dim is present, then all(mask, dim) returns an array with the rank of mask minus 1. The shape is determined from the shape of mask where the dim dimension is elided.

all(mask) is true if all elements of mask are true. It also is true if mask has zero size; otherwise, it is false.

If the rank of mask is one, then all(mask, dim) is equivalent to all(mask). If the rank is greater than one, then all(mask,
dim) is determined by applying all to the array sections.

Example

program test_alllogicalll=all((/.true.,.true.,.true./))print*,lcallsectioncontainssubroutine sectionintegera(2,3),b(2,3)a=1b=1b(2,2)=2print*,all(a .eq.b,1)print*,all(a .eq.b,2)endsubroutine sectionendprogram test_all