Sharing Fortran code, and a getopt_long module

Sharing Fortran code, and a getopt_long module

joseph-krahn的头像

There are a lot of common Fortran math libraries, but not many non-math libraries. It would be nice if there were a good community place to post code outside of a full open-source project, and get feedback and discussion. For example, what if we had something like CodeGuru for Fortran. Is there anyone here that could host something like this?

As an example for the kind of utility code I am thinking about, I recently wrote a complete implementation of getopt and getopt_long using Fortran. One problem with the C getopt library is the use of globals. My Fortran version improves on this by using an object oriented version. You initialize the object, at which time it collects all arguments into allocated strings. This allows for easy argument access, and for modifying the argument list as arguments are parsed.

I'm sure other people would find this useful. But, what is the best way to share it? I think we need something more interactive than the traditional NetLib, and it is probably good to get something going soon to share various utility and sample codes with the new F2003 and F2008 features.

1 条帖子 / 0 new
如需更全面地了解编译器优化,请参阅优化注意事项