Clicky

Fortran Wiki
F2008 Smart Macros (changes)

Skip the Navigation Links | Home Page | All Pages | Recently Revised | Authors | Feeds | Export |

Showing changes from revision #4 to #5: (追記) Added (追記ここまで) | (削除) Removed (削除ここまで) | (削除) Chan (削除ここまで)(追記) ged (追記ここまで)

Preprocessing is an important(削除) feature (削除ここまで)(追記) feature, (追記ここまで)(追記) still (追記ここまで) not supported by Fortran(削除) Standards (削除ここまで)(追記) 2008 (追記ここまで)

Tools

See Preprocessors for links to coco, fpp and others.

Rant

Preprocessing can be very important for dealing with code compilation options. That is why Fortran compilers support CPP preprocessing. Unfortunately, CPP is not a good choice, so most compilers support a Fortran-aware variant of CPP often referred to ads fpp, but it is non-standard and not always equivalent among compilers.

I was happy to hear that Fortran2008 was going to support "Intelligent Macros". ☺ However, it was dropped from the final F2008 draft. ☹ Here is a discussion

It seems that they tried to make macros too intelligent, then decided it was an unnecessary complication. So, once again, the Fortran Standards committees have failed to get a clue, and we are stuck with hoping for a common fpp convention outside of the standards.

There is an official specification for coco, a conditional-compilation preprocessor. This seems to be a good alternative to support conditional features while avoiding functional macros. However, coco was not designed well, and never caught on.

Actually, it seems than Dan Nagle is using coco. He is the author of the coco implementation referenced above, which has a latest revision date of 2007. Dan Nagle is also one of the opponents to F2008 macros. Maybe the Standards committees still want us to use coco?

Revised on July 1, 2010 13:19:09 by Joe Krahn (157.98.68.58) (1595 characters / 0.0 pages)
Edit | Back in time (4 revisions) | Hide changes | History | Views: Print | TeX | Source | Linked from: Preprocessors

AltStyle によって変換されたページ (->オリジナル) /