The workaround for the list item problem returns the correct result
but I am now back to the original problem of the "duration >
duration_threshold" comparison returning the incorrect result.
The following slightly bizarre code seems to fix both problems:
feature -- Measurement
onset_time: REAL
offset_time: REAL
duration: REAL is
--
do
Result := offset_time - onset_time
end
is_threshold_exceeded (duration_threshold: REAL): BOOLEAN is
--
local
l_duration: REAL
do
l_duration.set_item (duration)
-- Assignment doesn't work
-- l_duration := duration
if l_duration > duration_threshold then
Result := true
end
end
.