Forpedo News

Forpedo Now Supports Functions in Protocols

A new release of Forpedo is available. Version 0.2.1 adds support for functions in polymorphic protocols. Previously, only subroutines were supported. You can download the new version here.

Forpedo Bug-Fix Release

A new release of Forpedo is available. Version 0.1.1 is a bug fix release that corrects a problem for the #import directive that caused some filenames to be incorrectly parsed. You can download the new version here.

Forpedo Includes Run-Time Polymorphism

Forpedo has been upgraded to include support for run-time polymorphism, as described here. Run-time polymorphism is an important part of Object-Oriented Programming (OOP), and is supported in Fortran 2003, but not earlier standards. With Forpedo you can mimic run-time polymorphism in Fortran 90/95 programs, making the transition to Fortran 2003 easier when compilers of that standard become readily available.

Forpedo Featured in Fortran Forum

I have published an article on Forpedo in Fortran Forum. If you or your library subscribes to it, you can find it in the August 2005 edition, Volume 24, Issue 2, Pages 18-29. The source code from the article can be downloaded here.

Introducing the Forpedo

Forpedo is a preprocessor for Fortran 90 code, written in Python. It can handle some typical preprocessing tasks, like including code from one file in another, but it is mostly designed to provide advanced techniques to pre-Fortran 2003 versions of the language. In particular, there is support for C++ like generics (templates), and run-time polymorphism from Object-Oriented Programming (OOP) (click here for more details on OOP in Fortran).

The output of Forpedo is pure Fortran code, which should work with any standard compiler. Every effort has also been made to ensure output code looks like it could have been written by a programmer. If at any point you decide to stop using Forpedo, you will at least be left with a body of good-quality Fortran code.

To use Forpedo, you will need access to a recent version of Python (2.3 or later). Python is commonly available these days, on almost all platforms.

If you find any bugs in Forpedo, please report them to drewmccormack at mac.com Suggestions and offers of support are also welcome.