Skip to content
Snippets Groups Projects
Commit 0964baab authored by Florian Prill's avatar Florian Prill Committed by Luis Kornblueh
Browse files

replaced div routine in hl interface.

parent e254c1fc
No related branches found
No related tags found
No related merge requests found
...@@ -194,7 +194,7 @@ MODULE mtime_hl ...@@ -194,7 +194,7 @@ MODULE mtime_hl
! thrown. ! thrown.
PROCEDURE :: toMilliSeconds => t_timedelta_toMilliSeconds PROCEDURE :: toMilliSeconds => t_timedelta_toMilliSeconds
PROCEDURE :: divideInSecondsBy => t_timedelta_divideInSecondsBy PROCEDURE :: divideBy => t_timedelta_divideBy
! --- overloaded operators ! --- overloaded operators
......
...@@ -217,7 +217,7 @@ ...@@ -217,7 +217,7 @@
CALL my_deallocatetimedelta(c_pointer) !deallocate timedelta CALL my_deallocatetimedelta(c_pointer) !deallocate timedelta
END FUNCTION t_timedelta_toString END FUNCTION t_timedelta_toString
FUNCTION t_timedelta_divideInSecondsBy (this, divisor, referenceDateTime) RESULT(quotient) FUNCTION t_timedelta_divideBy (this, divisor, referenceDateTime) RESULT(quotient)
CLASS(t_timedelta), INTENT(in), target :: this CLASS(t_timedelta), INTENT(in), target :: this
TYPE(t_timedelta), INTENT(in), target :: divisor TYPE(t_timedelta), INTENT(in), target :: divisor
TYPE(t_datetime), INTENT(IN), target :: referenceDateTime TYPE(t_datetime), INTENT(IN), target :: referenceDateTime
...@@ -225,20 +225,12 @@ ...@@ -225,20 +225,12 @@
TYPE(t_datetime), target :: dt_tmp TYPE(t_datetime), target :: dt_tmp
type(c_ptr) :: dummy_ptr type(c_ptr) :: dummy_ptr
dummy_ptr = my_divideTimeDeltaInSeconds(c_loc(this%td), c_loc(divisor%td), & dummy_ptr = my_divideTimeDelta(c_loc(this%td), c_loc(divisor%td), &
& c_loc(referenceDateTime%dt), c_loc(quotient)) & c_loc(referenceDateTime%dt), c_loc(quotient))
IF (.NOT. c_associated(dummy_ptr)) THEN CALL handle_errno(.not. c_associated(dummy_ptr), general_arithmetic_error, &
dt_tmp = referenceDateTime + this __FILE__, __LINE__)
dummy_ptr = my_dividedatetimedifferenceinseconds(c_loc(dt_tmp%dt), & END FUNCTION t_timedelta_divideBy
& c_loc(referenceDateTime%dt), &
& c_loc(divisor%td), c_loc(quotient))
CALL handle_errno(.not. c_associated(dummy_ptr), general_arithmetic_error, &
__FILE__, &
__LINE__)
END IF
END FUNCTION t_timedelta_divideInSecondsBy
FUNCTION t_timedelta_toSeconds (this, td) RESULT(seconds) FUNCTION t_timedelta_toSeconds (this, td) RESULT(seconds)
CLASS(t_timedelta), INTENT(in) :: this CLASS(t_timedelta), INTENT(in) :: this
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment