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

Compiler option or !DEC$ DEFINE?

Intel_C_Intel
Employee
341 Views
I'm looking for a way to mirror the operation of C++'s '#pragma once' in FORTRAN.
I guess !DEC$ DEFINE is what I want, but is there a compiler option for this?
0 Kudos
2 Replies
Jugoslav_Dujic
Valued Contributor II
341 Views

Why do you need that? It's much less useful in Fortran than in C++ because Fortran does not have source file scope. I think it could happen only if you had adeep treeof INCLUDE statements (in which case it cries for redesign anyway ;-) ),

Jugoslav

0 Kudos
Intel_C_Intel
Employee
341 Views

Yeah, the joys of updating / maintaining other peoples code ;o)

I just got around my problem by using PRIVATE in my MODULE - really I shouldn't have a mixed of MODULEs and COMMON blocks....

0 Kudos
Reply