libsim  Versione 7.1.6

◆ optionparser_add_iarray()

subroutine optionparser_class::optionparser_add_iarray ( type(optionparser), intent(inout)  this,
character(len=*), intent(in)  short_opt,
character(len=*), intent(in)  long_opt,
type(arrayof_integer), target  dest,
integer, dimension(:), optional  default,
character(len=*), optional  help 
)
private

Add a new option with an integer type array argument.

When parsing will be performed, if the requested option is encountered, its corresponding compulsory argument will be copied into the provided destination. The argument must be provided in the form of comma-separated list of values and is stored in an object of type arrayof_integer (module array_utilities). An optional default value 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 1186 del file optionparser_class.F90.

1187 CASE(2)
1188  CALL optionparser_printhelphtmlform(this)
1189 END SELECT
1190 
1191 END SUBROUTINE optionparser_printhelp
1192 
1193 
1197 SUBROUTINE optionparser_printhelptxt(this)
1198 TYPE(optionparser),INTENT(in) :: this
1199 
1200 INTEGER :: i, j, ncols
1201 CHARACTER(len=80) :: buf
1202 TYPE(line_split) :: help_line
1203 
1204 ncols = default_columns()
1205 
1206 ! print usage message
1207 IF (ASSOCIATED(this%usage_msg)) THEN
1208  help_line = line_split_new(cstr_to_fchar(this%usage_msg), ncols)
1209  DO j = 1, line_split_get_nlines(help_line)
1210  WRITE(*,'(A)')trim(line_split_get_line(help_line,j))
1211  ENDDO
1212  CALL delete(help_line)
1213 ELSE
1214  CALL getarg(0, buf)
1215  i = index(buf, '/', back=.true.) ! remove directory part
1216  IF (buf(i+1:i+3) == 'lt-') i = i + 3 ! remove automake prefix
1217  WRITE(*,'(A)')'Usage: '//trim(buf(i+1:))//' [options] [arguments]'
1218 ENDIF
1219 
1220 ! print description message
Index method.

Generated with Doxygen.