libsim  Versione6.3.0

◆ optionparser_add_rarray()

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

Add a new option with a real 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_real (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 1294 del file optionparser_class.F90.

1294 INTEGER :: colon
1295 
1296 colon = index(usage_msg, ':') ! typically 'Usage: cp [options] origin destination'
1297 IF (colon > 0 .AND. colon < len(usage_msg)-1) THEN
1298  mdquote_usage_msg = usage_msg(:colon+1)//'`'//usage_msg(colon+2:)//'`'
1299 ELSE
1300  mdquote_usage_msg = usage_msg
1301 ENDIF
1302 
1303 END FUNCTION mdquote_usage_msg
1304 
1305 END SUBROUTINE optionparser_printhelpmd
1306 
1310 SUBROUTINE optionparser_printhelphtmlform(this)
1311 TYPE(optionparser),INTENT(in) :: this
1312 
1313 INTEGER :: i
1314 
1315 DO i = 1, this%options%arraysize ! loop over options
1316  CALL option_format_htmlform(this%options%array(i))
1317 ENDDO
1318 
1319 WRITE(*,'(A)')'<input class="libsim_sub" type="submit" value="runprogram" />'
1320 
1321 END SUBROUTINE optionparser_printhelphtmlform
1322 
1323 
1324 SUBROUTINE optionparser_make_completion(this)
1325 TYPE(optionparser),INTENT(in) :: this
1326 
1327 INTEGER :: i
Index method.

Generated with Doxygen.