What's the purpose of array size inside subroutine arguments?

the ANY() and ALL() intrinsics are also useful for this. The expressions are clear to a human and easy for the compiler to optimize.

The programmer also has the option of including the checks in the source code, but surrounding them with either an if(.true.) block or a preprocessor directive #if 1. The compiler can then remove the dead code for the production builds, while giving the programmer easy access to the checking during the development/debug steps. Of course, parameters and macros can be used to activate/deactive multiple blocks.

1 Like