- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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:
!DEC$ IF DEFINED (INTEL9)
include 'fgraph.fd'
include 'global.inc'
!DEC$ ELSE
include 'global.inc'
include 'fgraph.fd'
!DEC$ ENDIF
include 'fgraph.fd'
include 'global.inc'
!DEC$ ELSE
include 'global.inc'
include 'fgraph.fd'
!DEC$ ENDIF
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?
Adrian
Link Copied
2 Replies
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Steve:
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.
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.
![](/skins/images/D3C0B914909A6564BBB97F4AD1ED1973/responsive_peak/images/icon_anonymous_message.png)
Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page