How to check if Fortran array contains value? How to check if Fortran array contains value? arrays arrays

How to check if Fortran array contains value?


ANY should actually be the right choice

if ( ANY( lastNeighArray=="n" ) ) then

there is also ALL if you wanted the whole array to contain that value.