libsim Versione 7.2.1

◆ optionparser_new()

type(optionparser) function, public optionparser_new ( character(len=*), intent(in), optional usage_msg,
character(len=*), intent(in), optional description_msg )

Create a new instance of an optionparser object.

General usage and description messages can be optionally provided, the options will be added later.

Parametri
[in]usage_msgshort help message which describes the program usage, if not provided, a standard message will be printed
[in]description_msglong help message which describes the program purpose, if not provided, nothing will be printed

Definizione alla linea 1055 del file optionparser_class.F90.

1056 CASE(2) ! compulsory
1057 IF (indeq /= 0) THEN
1058 optarg = arg(indeq+1:)
1059 status = max(option_found(this%options%array(j), optarg), &
1060 status)
1061 ELSE
1062 IF (i < iargc()) THEN
1063 i=i+1
1064 CALL getarg(i, optarg)
1065 status = max(option_found(this%options%array(j), optarg), &
1066 status)
1067 ELSE
1068 status = optionparser_err
1069 CALL l4f_log(l4f_error, &
1070 'in optionparser, option '''//trim(arg)//''' requires an argument')
1071 ENDIF

Generated with Doxygen.