libsim  Versione6.3.0

◆ optionparser_add_i()

subroutine optionparser_add_i ( type(optionparser), intent(inout)  this,
character(len=*), intent(in)  short_opt,
character(len=*), intent(in)  long_opt,
integer, target  dest,
integer, optional  default,
character(len=*), optional  help 
)

Add a new option with an integer 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 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 1168 del file optionparser_class.F90.

1168 
1169 
1173 SUBROUTINE optionparser_printhelp(this)
1174 TYPE(optionparser),INTENT(in) :: this
1175 
1176 INTEGER :: i, form
1177 
1178 form = 0
1179 DO i = 1, this%options%arraysize ! loop over options
1180  IF (this%options%array(i)%opttype == opttype_help) THEN
1181  form = this%options%array(i)%helpformat
1182  ENDIF
1183 ENDDO
1184 
1185 SELECT CASE(form)
1186 CASE(0)
1187  CALL optionparser_printhelptxt(this)
1188 CASE(1)
1189  CALL optionparser_printhelpmd(this)
1190 CASE(2)
1191  CALL optionparser_printhelphtmlform(this)
1192 END SELECT
1193 
1194 END SUBROUTINE optionparser_printhelp
1195 

Generated with Doxygen.