bug-prolog
[Top][All Lists]
Advanced

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

Re: Interpreter accepts integers exceeding max_integer


From: Daniel Diaz
Subject: Re: Interpreter accepts integers exceeding max_integer
Date: Tue, 28 Oct 2008 18:42:48 +0100
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

An exception (representation_error) should be raised. I'll check it.


Dave Sworin a écrit :
When a predicate takes an integer argument, it is not useful to check the range 
of
the argument using min_integer and max_integer because the interpreter passes the numbers to the predicate already wrapped. For example:

my_pred(222222222222). will be received as -1, which is within the range of 
min_integer
and max_integer. (I tested this with Fedora Core 4 which has a max_integer of 
about
256 million.)

Should the interpreter reject this input as a syntax error?  Or convert it to a 
float or something?

Dave




_______________________________________________
Bug-prolog mailing list
address@hidden
http://lists.gnu.org/mailman/listinfo/bug-prolog






reply via email to

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