Re: Is there a Fortran equivalent of C's #ifdef ??



Dave wrote:
Tim Prince wrote:
Compilers which support OpenMP will support cpp style #ifdef pre-processing.

Is there any way to find out if the compiler does support OpenMP? Obviously if I can be sure the compiler supports it, then I can test it that way.

I don't believe Tim's statement is correct. OpenMP has its own conditional compilation syntax which is not cpp-style and is more restrictive. Support of OpenMP does not, as far as I know, imply support of cpp-style conditional compilation.

Now it is true that many current Fortran compilers do support cpp-style directives - you may need to use a switch or name the file with an uppercase file type (F or F90). I recommend reading your compiler's documentation to see what it supports and how to enable it.

--
Steve Lionel
Developer Products Division
Intel Corporation
Nashua, NH

For email address, replace "invalid" with "com"

User communities for Intel Software Development Products
http://software.intel.com/en-us/forums/
Intel Software Development Products Support
http://software.intel.com/sites/support/
My Fortran blog
http://www.intel.com/software/drfortran
.



Relevant Pages

  • Re: how do you start learning assembly language
    ... compiler technology for decades, and which every compiler author have ... And I have refuted your claim that monofiles are bad idea or "design lack" ... Yes, I said that if an assembler did not support linking, it ...
    (alt.lang.asm)
  • ANN: Chicken 2.0
    ... - The compiler is able to inline more procedure calls ... - The alternative continuation API described in Marc Feeley's paper ... Hash-tables support now user-defined hash functions ...
    (comp.lang.scheme)
  • Re: Lint
    ... There are many versions of lint out there from "free" to expensive. ... Free, as in open source, will often take time to get full use of - and it may have hidden "costs" (such as license or support issues). ... Secondly, C compilers do much better static error checking than they used to as a side effect of better optimisation - while figuring out things like aliasing, variable lifetimes, and ideal memory organisation, a compiler can often spot buffer overflows and other such errors. ...
    (comp.arch.embedded)
  • Re: made it to page 4 of gforth tutorial
    ... you the facts over and over and your coming back saying it was ... So let's review again. ... 2DROP as if an optimizing compiler was going to turn the ... it would have professional support. ...
    (comp.lang.forth)
  • CMUCL 19f released
    ... The CMUCL project is pleased to announce the release of CMUCL 19f. ... SSE2 support added for x86. ... Compiler can now derive the rank of an array, ...
    (comp.lang.lisp)