users-prolog
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: min and max in arithmetic ?


From: Jean Michel LECONTE
Subject: Re: min and max in arithmetic ?
Date: Fri, 21 Jun 2002 12:13:49 GMT

min(X,Y,X) :- X #=< Y.
min(X,Y,Y) :- Y #=< Y. is working (with X and Y constrained variables), isnt it ?


Jasper Taylor writes:
Hi...is there any plan to incorporate min and max (return lesser or greater of two values) into gprolog's arithmetic? I'm porting an application from Sicstus, which includes this feature. I tried to do it myself simply by looking through the source for all the places where the arithmetic operators appear and adding min and max in what seems a relevant way -- but this just makes a build that produces a segmentation violation every time they are used. --Jasper

_______________________________________________
Users-prolog mailing list
address@hidden
http://mail.gnu.org/mailman/listinfo/users-prolog




reply via email to

[Prev in Thread] Current Thread [Next in Thread]