.. index:: counter
.. _counter/0:

.. rst-class:: right

**object**

``counter``
===========

Counter implemented with asserta/retract.

| **Author:** Victor Lagerkvist
| **Version:** 1:0:0
| **Date:** 2010-06-13

| **Compilation flags:**
|    ``static, context_switching_calls``


| **Dependencies:**
|   (none)


| **Remarks:**
|    (none)

| **Inherited public predicates:**
|    (none)

.. contents::
   :local:
   :backlinks: top

Public predicates
-----------------

.. raw:: html

   <div id="increment/0"> </div>

.. index:: increment/0
.. _counter/0::increment/0:

``increment/0``
^^^^^^^^^^^^^^^

Increment the counter by 1.

| **Compilation flags:**
|    ``static``

| **Mode and number of proofs:**
|    ``increment`` - ``one``


------------

.. raw:: html

   <div id="increase/1"> </div>

.. index:: increase/1
.. _counter/0::increase/1:

``increase/1``
^^^^^^^^^^^^^^

Increments the counter by the specified amount.

| **Compilation flags:**
|    ``static``

| **Mode and number of proofs:**
|    ``increase(+number)`` - ``one``

| **argname:**
|    [I]

------------

.. raw:: html

   <div id="set/1"> </div>

.. index:: set/1
.. _counter/0::set/1:

``set/1``
^^^^^^^^^

Sets the counter to the specified amount.

| **Compilation flags:**
|    ``static``

| **Mode and number of proofs:**
|    ``set(+number)`` - ``one``

| **argname:**
|    [N]

------------

.. raw:: html

   <div id="value/1"> </div>

.. index:: value/1
.. _counter/0::value/1:

``value/1``
^^^^^^^^^^^

Gets the current value of the counter.

| **Compilation flags:**
|    ``static``

| **Mode and number of proofs:**
|    ``value(?number)`` - ``one``

| **argname:**
|    [N]

------------

.. raw:: html

   <div id="reset/0"> </div>

.. index:: reset/0
.. _counter/0::reset/0:

``reset/0``
^^^^^^^^^^^

Resets the counter to zero.

| **Compilation flags:**
|    ``static``

| **Mode and number of proofs:**
|    ``reset`` - ``one``


------------

Protected predicates
--------------------

(none)

Private predicates
------------------

.. raw:: html

   <div id="c/1"> </div>

.. index:: c/1
.. _counter/0::c/1:

``c/1``
^^^^^^^

| **Compilation flags:**
|    ``dynamic``


------------

Operators
---------

(none)

