[PPL-devel] Re: [SWIPL] Max integer and max tagged integer

Jan Wielemaker jan at swi.psy.uva.nl
Fri Apr 23 10:35:34 CEST 2004


Hi Roberto,

> I am trying to write some portable code and, in foreign
> code, I need to know what is the maximum integer value
> that can be passed to PL_put_integer().
> 
> Am I correct if I say that the right way to know that
> value is by calling
> 
>      PL_query(PL_QUERY_MAX_INTEGER)

Yip.  Please note that since quite a while SWI-Prolog's integers are
C longs and can represent all values a C long can.

> and that I need not be concerned with the
> PL_QUERY_MAX_TAGGED_INT query that is defined a couple
> of lines later in SWI-Prolog.h?

Yip.  This returns the maximum value that is stored efficiently on
the stacks (the space required for integers appearing in a clause
is always the same).

	Cheers --- Jan



More information about the PPL-devel mailing list