Did you know ... | Search Documentation: |
Pack logtalk -- logtalk-3.85.0/docs/_sources/integer_0.rst.txt |
.. index:: integer .. _integer/0:
.. rst-class:: right
object
integer
Integer data type predicates.
| Availability:
| logtalk_load(types(loader))
| Author: Paulo Moura | Version: 1:55:0 | Date: 2022-06-21
| Compilation flags:
| static, context_switching_calls
| Extends:
| public
:ref:`number <number/0>`
| Remarks:
| Inherited public predicates: | Â :ref:`comparingp/0::(<)/2` Â :ref:`comparingp/0::(=:=)/2` Â :ref:`comparingp/0::(=<)/2` Â :ref:`comparingp/0::(=\=)/2` Â :ref:`number/0::=~= / 2` Â :ref:`comparingp/0::(>)/2` Â :ref:`comparingp/0::(>=)/2` Â :ref:`number/0::approximately_equal/2` Â :ref:`number/0::approximately_equal/3` Â :ref:`termp/0::check/1` Â :ref:`termp/0::depth/2` Â :ref:`number/0::essentially_equal/3` Â :ref:`termp/0::ground/1` Â :ref:`termp/0::new/1` Â :ref:`termp/0::numbervars/1` Â :ref:`termp/0::numbervars/3` Â :ref:`termp/0::occurs/2` Â :ref:`termp/0::singletons/2` Â :ref:`termp/0::subsumes/2` Â :ref:`termp/0::subterm/2` Â :ref:`number/0::tolerance_equal/4` Â :ref:`termp/0::valid/1` Â :ref:`termp/0::variables/2` Â :ref:`termp/0::variant/2` Â :ref:`termp/0::varnumbers/2` Â :ref:`termp/0::varnumbers/3` Â
.. contents:: :local: :backlinks: top
.. index:: between/3 .. _integer/0::between/3:
between/3 ^^^^^^^^^^^^^
Returns integers in the interval defined by the two first arguments.
| Compilation flags:
| static
| Template:
| between(Lower,Upper,Integer)
| Mode and number of proofs:
| between(+integer,+integer,+integer)
- zero_or_one
| between(+integer,+integer,-integer)
- zero_or_more
.. index:: plus/3 .. _integer/0::plus/3:
plus/3 ^^^^^^^^^^
Reversible integer sum. At least two of the arguments must be instantiated to integers.
| Compilation flags:
| static
| Template:
| plus(I,J,Sum)
| Mode and number of proofs:
| plus(+integer,+integer,?integer)
- zero_or_one
| plus(+integer,?integer,+integer)
- zero_or_one
| plus(?integer,+integer,+integer)
- zero_or_one
.. index:: succ/2 .. _integer/0::succ/2:
succ/2 ^^^^^^^^^^
Successor of a natural number. At least one of the arguments must be instantiated to a natural number.
| Compilation flags:
| static
| Template:
| succ(I,J)
| Mode and number of proofs:
| succ(+integer,?integer)
- zero_or_one
| succ(?integer,+integer)
- zero_or_one
.. index:: sequence/3 .. _integer/0::sequence/3:
sequence/3 ^^^^^^^^^^^^^^
Generates a list with the sequence of all integers in the interval [Lower,Upper]
. Assumes Lower =< Upper
and fails otherwise.
| Compilation flags:
| static
| Template:
| sequence(Lower,Upper,List)
| Mode and number of proofs:
| sequence(+integer,+integer,-list(integer))
- zero_or_one
.. index:: sequence/4 .. _integer/0::sequence/4:
sequence/4 ^^^^^^^^^^^^^^
Generates a list with the sequence of integers in the interval [Lower,Upper]
by Step
. Assumes Lower =< Upper, Step >= 1
and fails otherwise.
| Compilation flags:
| static
| Template:
| sequence(Lower,Upper,Step,List)
| Mode and number of proofs:
| sequence(+integer,+integer,+integer,-list(integer))
- zero_or_one
(no local declarations; see entity ancestors if any)
(no local declarations; see entity ancestors if any)
(none)