From 5dff8c1b0061823a01b74e234ea8d083536e7c5e Mon Sep 17 00:00:00 2001 From: jfe <git@jfengels.de> Date: Tue, 18 Dec 2018 11:23:11 +0100 Subject: [PATCH] Fixup examples_hl.f90 --- examples/example_hl.f90 | 31 +++---------------------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/examples/example_hl.f90 b/examples/example_hl.f90 index c0b46fd9..6745a2de 100644 --- a/examples/example_hl.f90 +++ b/examples/example_hl.f90 @@ -1,32 +1,9 @@ -MODULE mo_example - - IMPLICIT NONE - -CONTAINS - - INTEGER FUNCTION division(number1, number2, ifail) - INTEGER, INTENT(IN) :: number1, number2 - TYPE(t_error), INTENT(INOUT) :: ifail - - division = 0 - IF (number2 == 0) THEN - CALL create_error(ifail, t_arithmetic_error("Division by zero!")) - ELSE IF ((number1 < 0) .OR. (number2 < 0)) THEN - CALL create_error(ifail, t_invalid_input_error("Only positive numbers allowed!")) - ELSE - division = number1 / number2 - END IF - END FUNCTION division -END MODULE mo_example - - PROGRAM example - USE mo_example - USE mtime, ONLY: setCalendar, PROLEPTIC_GREGORIAN - USE mtime_hl, ONLY: t_datetime, t_timedelta, min, max + USE mtime_hl, ONLY: t_datetime, t_timedelta, min, max, & + & t_timedeltaFromMilliseconds IMPLICIT NONE @@ -34,8 +11,6 @@ PROGRAM example TYPE(t_timedelta) :: td INTEGER :: test_number1, test_number2, test_result - TYPE(t_error) :: ifail - WRITE (0,*) "example_hl : test example" @@ -92,7 +67,7 @@ PROGRAM example WRITE (0,*) "MAX(", dt2%to_string(), ", ", dt3%to_string(), "): ", dt4%to_string() ! interval assignment with milliseconds - td = t_timedelta(360000) + td = t_timedeltaFromMilliseconds(360000) WRITE (0,*) "interval assignment with milliseconds: ", td%to_string() END PROGRAM example -- GitLab