|
◆ optionparser_add_r()
subroutine optionparser_class::optionparser_add_r |
( |
type(optionparser), intent(inout) |
this, |
|
|
character(len=*), intent(in) |
short_opt, |
|
|
character(len=*), intent(in) |
long_opt, |
|
|
real, target |
dest, |
|
|
real, optional |
default, |
|
|
character(len=*), optional |
help |
|
) |
| |
|
private |
Add a new option with a real type argument.
When parsing will be performed, if the requested option is encountered, its corresponding compulsory argument will be copied into the provided destination. An optional value default can be provided for the destination. Please use the generic optionparser_add method rather than this particular method. - Parametri
-
[in,out] | this | optionparser object |
[in] | short_opt | the short option (may be empty) |
[in] | long_opt | the long option (may be empty) |
| dest | the destination of the option parse result |
| default | the default value to give to dest if option is not found |
| help | the help message that will be formatted and pretty-printed on screen |
Definizione alla linea 1230 del file optionparser_class.F90.
1232 DO i = 1, this%options%arraysize
1233 CALL option_format_help(this%options%array(i), ncols)
1236 END SUBROUTINE optionparser_printhelptxt
1242 SUBROUTINE optionparser_printhelpmd(this)
1243 TYPE(optionparser), INTENT(in) :: this
1245 INTEGER :: i, j, ncols
1246 CHARACTER(len=80) :: buf
1247 TYPE(line_split) :: help_line
1249 ncols = default_columns()
1252 WRITE(*, '(A)') '### Synopsis'
1254 IF ( ASSOCIATED(this%usage_msg)) THEN
1255 help_line = line_split_new(mdquote_usage_msg(cstr_to_fchar(this%usage_msg)), ncols)
1256 DO j = 1, line_split_get_nlines(help_line)
1257 WRITE(*, '(A)')trim(line_split_get_line(help_line,j))
|