Skip to content

Latest commit

 

History

History
57 lines (33 loc) · 2.33 KB

README.md

File metadata and controls

57 lines (33 loc) · 2.33 KB

ecasglez's FortranUtilities is a collection of simple functions for Fortran programs I used during my PhD studies, organized in a library for easy use. It does not intend to be a replacement of the Fortran Standard Library (stdlib), because the stdlib has a much wider scope, but at the time I was at University stdlib did not exist.

Functions for strings, numbers, precision, statistics and files are included. See the specifications of the different functions here. More functions for different tasks will be included in the future.

This is a BETA version. All functions work properly on Linux using gfortran 7.5 or newer, and all functions except symlink functions work on Windows using gfortran 7.5 (MSYS2-Mingw-w64) or newer. More compilers will be tested in the future.

Download

The latest version of this library can be obtained from the GitHub repository located here.

Compilation

Compilation instructions are here.

A static and a shared library are created. Test programs for both libraries are created too.

Documentation

Documentation of the different functions is here.

Usage example

To use the library in your programs you first need to use the module of interest, as in the following example:

PROGRAM test
USE FU_Strings
WRITE(*,*) int2str(5)
END PROGRAM test

Then you have to link to the library when compiling. For example:

  1. To use the static library:

    gfortran program.f90 -o program -lFortranUtilitiesStatic -L/path/to/the/library/folder -I/path/to/include/folder -lstdc++
    
  2. To use the shared library:

    gfortran program.f90 -lFortranUtilities -L/path/to/the/library/folder -I/path/to/include/folder
    

Advanced examples are here.

Contact

Developed by Emilio Castro.

Create a Issue in GitHub if you have any suggestion, comment, enhancement, bug, etc.

License

These files are distributed under a MIT license. See LICENSE file for more information on using and distributing these files.