What are the minimum/maximum integers in gprolog? Is there a way to reference these numbers without using a "magic number"?
Asked
Active
Viewed 1,931 times
1 Answers
8
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.

Nick Barnes
- 19,816
- 3
- 51
- 63
-
3Also note that, as the question tags hint, `bounded`, `min_integer`, and `max_integer` are ISO Prolog Core standard specified flags and you can use them with most Prolog systems. – Paulo Moura Nov 07 '13 at 18:02