!DEC$ compiler directives

!DEC$ compiler directives

I am having a bit of bother getting a bit of code to compile both in DVF6.0 and IVF9.0. I am doing this by specifying a preprocessor symbol INTEL9 when compiling under IVF9.0. The code is as follows:

include 'fgraph.fd'
include 'global.inc'
include 'global.inc'
include 'fgraph.fd'
It may look strange but I have to do this as we have an IMPLICIT NONE statement in global.inc. In DVF, fgraph.fd contained code, so had to be placed after the IMPLICIT NONE, ie. after the global.inc include. However in IVF, fgraph.fd contains a USE statement, which has to be placed before the IMPLICIT NONE statement, so I have to switch them around.

However the DVF compiler doesn't seem to understand the !DEC$ compiler stuff. If I remove it, it compiles just fine, however with it in, it spews out error messages obviously connected to the fact that it did not include global.inc. The DVF help says this syntax is correct.

Any ideas?


3 posts / 0 new
Last post
For more complete information about compiler optimizations, see our Optimization Notice.

DVF 6.0, eh? Gotta tune up my Wayback Machine.

I have a vague recollection that DVF 6.0 went ahead and processed INCLUDE lines even if you "conditionalized" them out. The way DVF/CVF and even IVF handles the !DEC$ style of conditional compilation is a bit odd, in that the lines get parsed regardless and then conditionally ignored (usually). A number of bugs in this regard have been fixed over the years.

You don't need to define your own symbol - use __INTEL_COMPILER, which is predefined by IVF.

The syntax is correct, but I think you are running into a DVF bug. Consider using the fpp preprocessor instead (you have to enable it with /fpp) and the #ifdef style directives. That should work for you as it actually runs a separate preprocessor.

Retired 12/31/2016


That's interesting. I've expereinced various strangeness with !DEC compiler directives in {D|C|I}VF over the years. Your explanation explains volumes. I know I've seen one such strange thing with IVF, but for the life of me can;t recall now. I've always found way to 'trick' the parser into doing what I needed, including fpp, so I'm conditioned to ignore these instead of reporting them. That will change now. Thanks.

Leave a Comment

Please sign in to add a comment. Not a member? Join today