get_args_fixed_length(3f) - [ARGUMENTS:M_CLI2] return keyword values for fixed-length string when parsing command line (LICENSE:PD)
Synopsis
Description
Options
Example
Author
License
subroutine get_args_fixed_length(name,value)
character(len=:),allocatable :: value character(len=*),intent(in),optional :: delimiters
GET_ARGS_fixed_length(3f) returns the value of a string keyword when the string value is a fixed-length CHARACTER variable.
NAME name of commandline argument to obtain the value of VALUE variable to hold returned value. Must be a fixed-length CHARACTER variable. DELIMITERS By default the delimiter for array values are comma, colon, and whitespace. A string containing an alternate list of delimiter characters may be supplied.
Sample program:
program demo_get_args_fixed_length use M_CLI2, only : set_args, get_args_fixed_length implicit none ! DEFINE ARGS character(len=80) :: title call set_args( & & -title "my title" & & ) ! ASSIGN VALUES TO ELEMENTS call get_args_fixed_length(title,title) ! USE VALUES write(*,*)title=,title end program demo_get_args_fixed_length
John S. Urban, 2019
Public Domain
get_args_fixed_length (3) | March 11, 2021 |