libsim  Versione7.2.3

◆ 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 1320 del file optionparser_class.F90.

1320 
1321 SUBROUTINE optionparser_make_completion(this)
1322 TYPE(optionparser),INTENT(in) :: this
1323 
1324 INTEGER :: i
1325 CHARACTER(len=512) :: buf
1326 
1327 CALL getarg(0, buf)
1328 
1329 WRITE(*,'(A/A/A)')'_'//trim(buf)//'()','{','local cur'
1330 
1331 WRITE(*,'(A/A/A/A)')'COMPREPLY=()','cur=${COMP_WORDS[COMP_CWORD]}', &
1332  'case "$cur" in','-*)'
1333 
1334 !-*)
1335 ! COMPREPLY=( $( compgen -W
1336 DO i = 1, this%options%arraysize ! loop over options
1337  IF (this%options%array(i)%need_arg == 2) THEN
1338  ENDIF
1339 ENDDO
1340 
1341 WRITE(*,'(A/A/A)')'esac','return 0','}'
1342 
1343 END SUBROUTINE optionparser_make_completion
1344 
1345 
1346 SUBROUTINE dirty_char_assignment(destc, destclen, src)
1347 USE kinds
1348 IMPLICIT NONE
1349 
1350 CHARACTER(len=1) :: destc(*)
1351 CHARACTER(len=*) :: src
Definition of constants to be used for declaring variables of a desired type.
Definition: kinds.F90:255

Generated with Doxygen.