diff --git a/library/c_alarms.yap b/library/c_alarms.yap index e238f1dae..b1b33ba30 100644 --- a/library/c_alarms.yap +++ b/library/c_alarms.yap @@ -9,8 +9,8 @@ % % Contributions to this file: % Author: Theofrastos Mantadelis -% $Date: 2011-02-01 18:36:41 +0100 (Tue, 01 Feb 2011) $ -% $Revision: 7 $ +% $Date: 2011-02-04 16:04:49 +0100 (Fri, 04 Feb 2011) $ +% $Revision: 11 $ % Contributions: The timer implementation is inspired by Bernd Gutmann's timers % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% @@ -394,4 +394,4 @@ timer_pause(Name, Elapsed):- retract('$timer'(Name, _, StartTime)), statistics(walltime, [EndTime, _]), Elapsed is EndTime - StartTime, - assert('$timer'(Name, paused, Elapsed)). + assertz('$timer'(Name, paused, Elapsed)). diff --git a/library/flags.yap b/library/flags.yap index 20d318bc1..f2a825623 100644 --- a/library/flags.yap +++ b/library/flags.yap @@ -10,8 +10,8 @@ % Contributions to this file: % Author: Theofrastos Mantadelis % Sugestions: Bernd Gutmann, Paulo Moura -% $Date: 2011-02-03 17:19:26 +0100 (Thu, 03 Feb 2011) $ -% $Revision: 9 $ +% $Date: 2011-02-04 16:06:56 +0100 (Fri, 04 Feb 2011) $ +% $Revision: 12 $ % %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%% % @@ -357,8 +357,12 @@ in_interval_single(Type, (Min, Max)):- Min < Max, Max - Min > 0.0. -type_or_inf(_Type, (+inf)):- !. -type_or_inf(_Type, (-inf)):- !. +type_or_inf(Type, Value):- + nonvar(Type), nonvar(Value), + Value == (+inf), !. +type_or_inf(Type, Value):- + nonvar(Type), nonvar(Value), + Value == (-inf), !. type_or_inf(Type, Value):- call(Type, Value). in_interval(Type, [Interval|_Rest], Value):-