Title: | Digital Fortran |
Notice: | Read notes 1.* for important information |
Moderator: | QUARK::LIONEL |
Created: | Thu Jun 01 1995 |
Last Modified: | Fri Jun 06 1997 |
Last Successful Update: | Fri Jun 06 1997 |
Number of topics: | 1333 |
Total number of notes: | 6734 |
Steve, "DEC Fortran For OpenVMS VAX CSCPAT_0402 V6.1-101 Fixes ECO Summary" says: V6.1-100 The compiler now accepts the '#' character in column 1 as a whole-line comment delimiter. This is intended to allow the use of C preprocessors with Fortran source and use of '#' as a general comment delimiter is not recommended. We opened the door on this, now the customer asks: So, I need more details on the phrase "intended to allow the use of C preprocessors with Fortran source". Are there any Fortran switches that allow the C preprocessor to be run on Fortran source code with the results being passed to the Fortran compiler? If this is true, we may want to use conditional compilation to support both Windows NT and OpenVMS with the same Fortran source code. Is the use of this documented anywhere? Thank you in advance, -drew <<< TURRIS::DISK$NOTES_PACK:[NOTES$LIBRARY]FORTRAN.NOTE;1 >>> -< Digital Fortran >- ================================================================================ Note 13.94 DFVV bugs fixed 94 of 159 QUARK::LIONEL "Free advice is worth every cent" 4 lines 4-FEB-1994 10:36 -< # now allowed as comment introducer, V6.1-100 >- -------------------------------------------------------------------------------- The compiler now accepts the '#' character in column 1 as a whole-line comment delimiter. This is intended to allow the use of C preprocessors with Fortran source and use of '#' as a general comment delimiter is not recommended.
T.R | Title | User | Personal Name | Date | Lines |
---|---|---|---|---|---|
1191.1 | QUARK::LIONEL | Free advice is worth every cent | Thu Feb 20 1997 21:39 | 17 | |
No - the idea is that you would run C/PREPROCESS_ONLY (requiring that you have DEC C.) Either that, or one of the various freeware implementations of cpp. We've kicked around the idea of building at least the conditional compilation (but not macro expansion) part of cpp into the compilers. The Fortran 90 compiler on Alpha actually has conditional compilation, but using Microsoft Fortran PowerStation syntax, not cpp. (And not documented except for the forthcoming Intel compiler, for now.) Eventually, we may well add cpp syntax also, but right now the Fortran standards committee is waffling on what conditional compilation in Fortran should look like, and we may want to see what falls out. Maybe in the next year we'll actually get around to doing something here - even on VAX. Steve | |||||
1191.2 | CSC32::D_SANFORD | Fri Feb 21 1997 10:16 | 5 | ||
I will pass that on. So, you would use "CC/PREPROCESS_ONLY file.FOR" and take the resulting file "file.I" as input to the FORTRAN compiler. It all makes sense now... Thank you. -drew | |||||
1191.3 | QUARK::LIONEL | Free advice is worth every cent | Fri Feb 21 1997 11:06 | 5 | |
Yes. However, the C preprocessor will mangle the program somewhat unless you add /STANDARD=COMMON/COMMENTS=AS_IS to the CC/DECC/PREPROCESS_ONLY command line. See TURRIS::DECC note 1889 for more information. Steve |