Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28988 Discussions

SUM not allowed in constant expressions??

Espen_M_
Beginner
555 Views

The compiler complains that SUM is invalid in constant/initialization expressions, the argument to SUM is ofcourse a constant array...

Is this correct according to F03/08?

0 Kudos
4 Replies
TimP
Honored Contributor III
555 Views

This feature is first specified in f2008 but not yet implemented in ifort.

0 Kudos
Espen_M_
Beginner
555 Views

I read in section 7.1.7 of the f03 draft (N1601) that :

(5) A reference to a transformational standard intrinsic function other than NULL, where each
argument is an initialization expression,

is OK. Am I missing something?

0 Kudos
Steven_L_Intel1
Employee
555 Views

This is one of the last remaining items on our F03 list. It is not yet implemented but we hope to have it by this time next year.

0 Kudos
Espen_M_
Beginner
555 Views

OK.

For some reason I was convinced that parameterized derived types was the only F03 feature you didn't yet support, but taking a new look in the latest release notes I see that also the transformational intrinsics in initialization expressions lack. Perhaps I didn't noce it because it is on the next page ;)

I found a way through creating a "dummy array" and using SIZE though :)

0 Kudos
Reply