Most UNIX/Linux compilers assume that a file with a ".F" (upper case F)
extension is Fortran source that needs to be preprocessed.
When fpp is a link to cpp (often under UNIX), one has to be careful to
not use a C trigraph (e.g., ??' == caret). We discovered this issue
when printing error messages in the form:
'??? Some message ???'
Of course the workaround is to either use double quotes or add a space
between the last question mark and apostophe. There are other trigraphs
as well.
I think that the standard CoCo does not provide macros (though Dan
Nagle's version has that as an extension?). CoCo would be safer than
cpp.
>Ms. Beverly K. Pope
>ChevronTexaco
>Exploration and Production Technology Co.
>P.O. Box 425, Room E560
>Bellaire, TX 77401-0425
>e-mail: [log in to unmask]
>office: (713) 432-3921
>fax: (713) 432-6620
-----Original Message-----
From: Dan Nagle [mailto:[log in to unmask]]
Sent: Thursday, August 28, 2003 2:19 PM
To: [log in to unmask]
Subject: Re: fpp vs. cpp
Hello,
The "usual" difference between cpp and fpp is that fpp has been taught
that // is an operator, not a comment initiator, and perhaps to wrap
lines at an appropriate length. Note that fpp is not a standard
product, so there's no definitive answer. What a particular vendor
decided to do to cpp to make it "Fortran Friendly" is up to the vendor.
I've seen cases where fpp is a link to cpp.
There're several Fortran specific preprocessors on the net,
see Michel Olagnon's f90ppr at
http://www.ifremer.fr//ditigo/molagnon/fortran90/contenu.html
or my coco at
http://users.erols.com/dnagle
HTH
--
Cheers!
Dan Nagle
Purple Sage Computing Solutions, Inc.
On Thu, 28 Aug 2003 09:17:29 -0500, Harry R Millwater
<[log in to unmask]> wrote:
>One of our large F90 development projects uses cpp for conditional
>compilation. Should we be using fpp? What's the
>difference/advantages/disadvantages of one vs. another. What's the
>motivation for fpp? Was it patterned after cpp with special Fortran
>features?
|