command_line Module

A wrapper module for handling command line arguments. This module provides subroutine cl_getarg and integer function cl_iargc. Most of the compilers have getarg and iargc as their extensions. If not, one can use POSIX pxfgetarg and ipxfargc.

 (c) Copyright 1991 to 1998 by Michael A. Beer, William D. Dorland, 
 P. B. Snyder, Q. P. Liu, and Gregory W. Hammett. ALL RIGHTS RESERVED.

Note that Fortran 2003 includes get_command_argument and command_argument_count which will replace getarg and iargc.

Added preprocessor macro 1 to invoke Fortran 2003/2008 intrinsics


Contents


Functions

public function cl_iargc()

Returns the number of command line arguments using intrinsic command_argument_count or a fall back option

Arguments

None

Return Value integer


Subroutines

public subroutine cl_getarg(k, arg, len, ierr)

Gets k-th argument_count string and its length using intrinsic get_command_argument or a fall back option

Arguments

Type IntentOptional AttributesName
integer, intent(in) :: k
character(len=*), intent(out) :: arg
integer, intent(out) :: len
integer, intent(out) :: ierr

public subroutine cl_getenv(name, val, len, ierr)

FIXME : Add documentation

Arguments

Type IntentOptional AttributesName
character(len=*), intent(in) :: name
character(len=*), intent(out) :: val
integer, intent(out), optional :: len
integer, intent(out), optional :: ierr