libsim  Versione6.3.0

◆ optionparser_add_d()

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

Add a new option with a double precision 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 1338 del file optionparser_class.F90.

1338 ! COMPREPLY=( $( compgen -W
1339 DO i = 1, this%options%arraysize ! loop over options
1340  IF (this%options%array(i)%need_arg == 2) THEN
1341  ENDIF
1342 ENDDO
1343 
1344 WRITE(*,'(A/A/A)')'esac','return 0','}'
1345 
1346 END SUBROUTINE optionparser_make_completion
1347 
1348 
1349 
1350 SUBROUTINE dirty_char_pointer_set(from, to)
1351 CHARACTER(len=1),POINTER :: from
1352 CHARACTER(len=1),TARGET :: to
1353 from => to
1354 END SUBROUTINE dirty_char_pointer_set
1355 
1356 END MODULE optionparser_class
1357 
1358 
1359 SUBROUTINE dirty_char_assignment(destc, destclen, src, srclen)
1360 USE kinds
1361 IMPLICIT NONE
1362 
1363 INTEGER(kind=int_b) :: destc(*), src(*)
1364 INTEGER :: destclen, srclen
1365 
1366 INTEGER :: i
1367 
1368 DO i = 1, min(destclen, srclen)
1369  destc(i) = src(i)
Module for parsing command-line optons.
Definition of constants to be used for declaring variables of a desired type.
Definition: kinds.F90:270

Generated with Doxygen.