Article View: comp.sys.next.programmer
Article #468FORTRAN and cpp
From: Jan-Willem de Bruijn
Date: Thu, 06 Aug 1992 10:00
Date: Thu, 06 Aug 1992 10:00
25 lines
1712 bytes
1712 bytes
Does anyone have experience using FORTRAN on the NeXT? We are using Absoft's implementation, which gives the possibility of using the C preprocessor (cpp), thus allowing statements like #include and #define to appear in your FORTRAN code. We use header files to #define a set of constants, and use the same header files in C- as well as FORTRAN programs. This is not only for ease of maintenance, but also because cpp knows how to look in standard directories for include files. But cpp also removes comments, which it thinks start with /* or, on the NeXT (in Objective C), with //. But a double slash is used in FORTRAN for character array concatenation. Running cpp with the option -C to tell it not to remove comments has the unwanted effect of presenting the FORTRAN compiler with all comments from the (C-style) header files. Is there a way out of this, apart from not using // for concatenation? -- Jan-Willem de Bruijn ...!uunet!mcsun!sun4nl!dutrun!dutnak2!jwdb Seismics and Acoustics jwdb@dutnak2.tn.tudelft.nl Faculty of Applied Physics Discipline is never an end in itself, Delft University of Technology only a means to an end.
Technical Details
Message-ID:
<jwdb.713095217@dutnak2>Path:
arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!dutrun!dutrun2!dutnak2!jwdbShow Full Headers
Complete Article Headers
Newsgroups: comp.sys.next.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!mcsun!sun4nl!dutrun!dutrun2!dutnak2!jwdb From: jwdb@dutnak2.tudelft.nl (Jan-Willem de Bruijn) Subject: FORTRAN and cpp Message-ID: <jwdb.713095217@dutnak2> Summary: cpp removes // from FORTRAN code Keywords: FORTRAN cpp include double-slash Sender: news@dutrun2.tudelft.nl (UseNet News System) Nntp-Posting-Host: dutnak2.tn.tudelft.nl Organization: Delft University of Technology Date: Thu, 6 Aug 1992 10:00:17 GMT Lines: 25