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

directives / f95

vader1000
Beginner
467 Views
We are using CVF6.6A and have the f95 flag set. This type of thing no longer works:

!DEC$ IF .NOT. DEFINED (PARAMETERS)
... parameter declarations ...
!DEC$ DEFINE PARAMETERS
!DEC$ ENDIF

Please let me know what functionality has replaced this in F95. I have to imagine that conditional compilation in this fashion still is allowed, otherwise when include files are called twice, you will receive many errors. If this functionality is not possible in f95, then how can I keep the compiler from dying when it sees a redeclartion from a .FD file included twice? We have parameters that are used across multiple files and in some cases this results in calling 2 times. to get around it i was going to use the conditional compilation directives....
0 Kudos
4 Replies
Steven_L_Intel1
Employee
467 Views
How does it "not work"? It works for me. As I said in an earlier thread, directives are extensions and are flagged as such if you ask for standards checking. They still work, though.

Standard Fortran does not have conditional compilation (not yet, anyway - there have been proposals to add it in a way incompatible with all previous implementations.)

Steve
0 Kudos
vader1000
Beginner
467 Views
well, when i say it doesn't work, i make all warnings repspond as errors because as far as i am concerned, warnings are errors, so i don't distinguish warnings from errors and when i do this, i can't compile.

thanks for the info, though...
0 Kudos
vader1000
Beginner
467 Views
one other thing is that my fortran project is huge with hundreds of files in it, when i start a rebuild-all and i see gobs and gobs of errors/info/warnings come in, i usually stop it because there is a major problem.
0 Kudos
Steven_L_Intel1
Employee
467 Views
If you are enabling standards checking and forcing warnings to errors, then you can't use directives - period. For conditional compilation, an alternative is to use cpp-style conditionals (#ifdef, etc.) and check "Use FPP" under Settings..Fortran..Preprocessor. That won't trip standards warnings.

Steve
0 Kudos
Reply