libsim Versione 7.1.11

◆ 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 1061 del file optionparser_class.F90.

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
1072 ENDIF
1073 CASE(1) ! optional
1074 IF (indeq /= 0) THEN
1075 optarg = arg(indeq+1:)
1076 ELSE
1077 IF (i < iargc()) THEN

Generated with Doxygen.