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
Intel Software Development Products Support
My Fortran blog

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 ...
  • 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 ...
  • 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. ...
  • 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. ...
  • Ann: Chicken 2.41
    ... The CHICKEN Scheme-to-C compiler, Version 2.41 is now ... Slight reorganization of TinyCLOS and match macros and support code ... scheme as described in Henry Baker's paper "Cheney on the M.T.A."). ...