libsim Versione 7.1.11

◆ optionparser_add_r()

subroutine 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 
)

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]thisoptionparser object
[in]short_optthe short option (may be empty)
[in]long_optthe long option (may be empty)
destthe destination of the option parse result
defaultthe default value to give to dest if option is not found
helpthe help message that will be formatted and pretty-printed on screen

Definizione alla linea 1230 del file optionparser_class.F90.

1231
1232DO i = 1, this%options%arraysize ! loop over options
1233 CALL option_format_help(this%options%array(i), ncols)
1234ENDDO
1235
1236END SUBROUTINE optionparser_printhelptxt
1237
1238
1242SUBROUTINE optionparser_printhelpmd(this)
1243TYPE(optionparser),INTENT(in) :: this
1244
1245INTEGER :: i, j, ncols
1246CHARACTER(len=80) :: buf
1247TYPE(line_split) :: help_line
1248
1249ncols = default_columns()
1250
1251! print usage message
1252WRITE(*,'(A)')'### Synopsis'
1253
1254IF (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))
1258 ENDDO

Generated with Doxygen.