Skip to content
master
Go to file
Code

Latest commit

  - Correctly set default values when using var=... parameter to define_option.

  - Add a couple of tests

  - Don't print "option not found" error message when the user passes -h and the
    programmer has set a help routine.
ee02c0f

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
src
Mar 22, 2015
Mar 22, 2015
May 24, 2013

README.md

Options and input processing for Fortran

options.f90 is a Fortran module for defining and parsing command-line options and input parameters for Fortran programs. Its design is inspired by Python's optparse module. Some features:

  • Allows definition of options/parameters (real, integer, logical, string, and flags) corresponding to natural Fortran types, with names and descriptions

  • Automates reading option values from the command line and input parameters from file

  • Supports long options (e.g. --myopt) and short options (-m), as well as combining several short options (e.g. -v -c is the same as -vc)

  • Performs rigorous input validation & other error checking

  • Supports default values for all option types, and lower & upper bounds on numerical options

  • Can print nice descriptions of available options, with line wrapping as necessary

  • Designed to be easily extended with new option types

  • Well-tested and carefully coded (much of the code has been formally verified)

  • Easy to use

For more info, see http://infty.net/options/options.html

To Do

Some goals for future versions of this library:

  1. Include support for commands, rather than just options, on the command line.

  2. Create a mechanism for automatically generating a help message, given a short description of the program.

About

Options & input processing for modern Fortran

Resources

Releases

No releases published

Packages

No packages published
You can’t perform that action at this time.