Re: [eclipse-clp-users] How to override arithmetic functions with ISO standard conforming definitions?

From: Kish Shen <kisshen_at_cisco.com>
Date: Thu, 08 Nov 2012 04:23:27 +0000
Hi Paulo,

truncate/1 and round/1 occurring inside expressions (i.e. rhs of is/2) 
are mapped to the corresponding predicates, i.e. they are factored out 
of the expression and a call to the predicate is made. I would therefore 
expect that you don't need to do anything different for handling these 
the same way as you handle the predicate calls -- are you getting 
different results for the two cases?

Cheers,

Kish

On 06/11/2012 15:13, Paulo Moura wrote:
>
> Hi,
>
> I'm running some portable code and getting into trouble with ECLiPSe (6.1#125) due to the non-standard conforming definitions of arithmetic functions such as truncate/1 and round/1, which return a float instead of an integer, as per the ISO Prolog standard specification.
>
> Is it possible to override the native definitions of these functions? I can only find ways of doing it for predicates, not for functions.
>
> Cheers,
>
> Paulo
>
>
> -----------------------------------------------------------------
> Paulo Moura
> Logtalk developer
>
> Email: <mailto:pmoura_at_logtalk.org>
> Web:   <http://logtalk.org/>
> -----------------------------------------------------------------
>
>
>
>
>
> ------------------------------------------------------------------------------
> LogMeIn Central: Instant, anywhere, Remote PC access and management.
> Stay in control, update software, and manage PCs from one command center
> Diagnose problems and improve visibility into emerging IT issues
> Automate, monitor and manage. Do more in less time with Central
> http://p.sf.net/sfu/logmein12331_d2d
> _______________________________________________
> ECLiPSe-CLP-Users mailing list
> ECLiPSe-CLP-Users_at_lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/eclipse-clp-users
>
Received on Thu Nov 08 2012 - 04:23:36 CET

This archive was generated by hypermail 2.2.0 : Fri Nov 09 2012 - 06:20:36 CET