libsim Versione 7.2.6

◆ arrayof_datetime_remove()

subroutine arrayof_datetime_remove ( type(arrayof_datetime) this,
integer, intent(in), optional nelem,
integer, intent(in), optional pos )

Method for removing elements of the array at a desired position.

If necessary, the array is reallocated to reduce space.

Parametri
thisarray object in which an element has to be removed
[in]nelemnumber of elements to remove, if not provided, a single element is removed
[in]posposition of the element to be removed, if it is out of range, it is clipped, if it is not provided, objects are removed at the end

Definizione alla linea 1352 del file datetime_class.F90.

1357ELEMENTAL FUNCTION timedelta_abs(this) RESULT(res)
1358TYPE(timedelta),INTENT(IN) :: this
1359TYPE(timedelta) :: res
1360
1361res%iminuti = abs(this%iminuti)
1362res%month = abs(this%month)
1363
1364END FUNCTION timedelta_abs
1365
1366
1367!> This method reads from a Fortran file unit the contents of the
1368!! object \a this. The record to be read must have been written with
1369!! the ::write_unit method. The method works both on formatted and
1370!! unformatted files.
1371SUBROUTINE timedelta_read_unit(this, unit)
1372TYPE(timedelta),INTENT(out) :: this !< object to be read
1373INTEGER, INTENT(in) :: unit !< unit from which to read, it must be an opened Fortran file unit
1374
1375CALL timedelta_vect_read_unit((/this/), unit)
1376
1377END SUBROUTINE timedelta_read_unit
1378
1379
1380!> This method reads from a Fortran file unit the contents of the
1381!! object \a this. The record to be read must have been written with
1382!! the ::write_unit method. The method works both on formatted and
1383!! unformatted files.
1384SUBROUTINE timedelta_vect_read_unit(this, unit)
1385TYPE(timedelta) :: this(:) !< object to be read
1386INTEGER, INTENT(in) :: unit !< unit from which to read, it must be an opened Fortran file unit
1387
1388CHARACTER(len=40) :: form
1389CHARACTER(len=23), ALLOCATABLE :: dateiso(:)
1390INTEGER :: i
1391
1392ALLOCATE(dateiso(SIZE(this)))
1393INQUIRE(unit, form=form)
1394IF (form == 'FORMATTED') THEN
1395 READ(unit,'(3(A23,1X))')dateiso
1396ELSE
1397 READ(unit)dateiso
1398ENDIF

Generated with Doxygen.