Re: comment and IBM xlf



I don't think it's going to work even if you find a way to run cpp
before compilation. My undersdanding (with regard to Fortran) is that
essentially, all cpp does is adding or removing peices of code (written
in Fortran) based on what instructions you give to it. So even if you
run it on your code, it won't remove all c-style comments - that's just
not what it does.
I see three options for you:
1. add ! to /*comments*/ using a utility like sed.
2. Use libgetkw. I've just come accross it, so I am not sure how it
works, but it seems to do what you need.
http://jonas.iki.fi/index.php#libgetkw
3. Remove or comment the c-style comments in the fortran way.

Victor.

.



Relevant Pages

  • Re: Is there a Fortran equivalent of Cs #ifdef ??
    ... there is an ISO standard preprocessor for Fortran ... (the Pathscale compiler does provide it, ... A Fortran compiler which provides cpp may just ... GNU implementation of cpp. ...
    (comp.lang.fortran)
  • Re: comment and IBM xlf
    ... My undersdanding (with regard to Fortran) is that ... all cpp does is adding or removing peices of code (written ... in Fortran) based on what instructions you give to it. ...
    (comp.lang.fortran)
  • Re: Universal "Comment" Character
    ... Fortran days. ... you can use cpp for hacks like this. ... Please do not send unsolicited bulk e-mail or unsolicited ...
    (sci.electronics.cad)
  • Re: Not-equals as # ?
    ... divide-equals. ... Another reason to avoid using # for anything is that some people use the C ... preprocessor cpp (or it's more fortran friendly variant fpp) with fortran. ...
    (comp.lang.fortran)
  • Re: comment and IBM xlf
    ... before compilation. ... all cpp does is adding or removing peices of code (written ... in Fortran) based on what instructions you give to it. ...
    (comp.lang.fortran)