Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

What are the minimum/maximum integers in gprolog?

What are the minimum/maximum integers in gprolog? Is there a way to reference these numbers without using a "magic number"?

like image 992
user2309462 Avatar asked Nov 07 '13 09:11

user2309462


1 Answers

I think these should work:

current_prolog_flag(bounded, X).
current_prolog_flag(min_integer, Y).
current_prolog_flag(max_integer, Z).

bounded tells you whether your implementation supports arbitrary large integers; if it's false, the min_integer / max_integer calls will fail.

like image 69
Nick Barnes Avatar answered Nov 10 '22 14:11

Nick Barnes