Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28597 Discussions

Sharing Fortran code, and a getopt_long module

joseph-krahn
New Contributor I
275 Views
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.
0 Kudos
0 Replies
Reply