MAXLOC and MINLOC intrinsics

MAXLOC and MINLOC intrinsics

Fortran 90 specified the MAXLOC and MINLOC intrinsics with only ARRAY and MASK arguments. The High Performance Fortran (HPF) group added the DIM argument between the original two arguments for consistency with the MAXVAL and MINVAL intrinsics. An incompatibility between Fortran 90 and HPF results unless MAXLOC and MINLOC are specified as generic interfaces, each with two specific interfaces: the first matching Fortran 90 and the second adding a non-optional DIM argument as the second argument. The Fortran Standards Committee decided that Fortran 95 should allow the DIM and MASK arguments to be specified in either order. For consistency, this provision for DIM and MASK to be specified in either order was extended to the other intrinsics that have the same arguments. These intrinsics are MAXVAL, MINVAL, PRODUCT, and SUM.

 

 

Basket
Empty
 
Copyright © 1999-2024 Silverfrost Limited