Quantcast
Channel: Intel® Fortran Compiler for Linux* and macOS*
Viewing all articles
Browse latest Browse all 2583

MAXVAL in constant expressions?

$
0
0

Hello,

are there plans to support MAXVAL & friends in F2008 constant expressions?

  integer, parameter :: m = maxval ( [ 1, 2 ] )
end

leads to

% ifort -V ifort-const-maxval.f90 -stand f08Intel(R) Fortran Compiler XE for applications running on IA-32, Version 14.0.1.106 Build 20131008
Copyright (C) 1985-2013 Intel Corporation.  All rights reserved.
FOR NON-COMMERCIAL USE ONLY

 Intel(R) Fortran 14.0-1599
ifort-const-maxval.f90(1): error #6263: This intrinsic function is invalid in constant expressions.   [MAXVAL]
  integer, parameter :: m = maxval ( [ 1, 2 ] )
----------------------------^
compilation aborted for ifort-const-maxval.f90 (code 1)

Thanks,

Harald

 


Viewing all articles
Browse latest Browse all 2583

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>