[ Non-logical Variables, Arrays, Bags, Shelves and Stores | The ECLiPSe Built-In Predicates | Reference Manual | Alphabetic Index ]

current_store(?StoreHandle)

StoreName is a visible store name
StoreHandle
A variable or a store name (atom or compound)

Calling Modes

Description

Used to check whether StoreName is the name of a visible store, or to enumerate all visible store names in the context module.

Note that this predicate will only accept/generate store names that have been created with local/1, store/1, not anonymous store handles created via store_create/1. Note: StoreHandle gets unified with an atom or a compound term, and the store is identified by this term's toplevel functor together with the context module.

Fail Conditions

StoreName is not a visible store name

Resatisfiable

Yes

Exceptions

(5) type error
StoreHandle is neither atom nor compound term nor variable

Examples

    :- local store(shed).
    :- local store(warehouse/3).

    ?- current_store(shed).
    Yes (0.00s cpu)

    ?- current_store(heap).
    No (0.00s cpu)

    ?- current_store(X).
    X = shed
    More (0.00s cpu) ? ;

    X = warehouse(_184, _185, _186)
    More (0.00s cpu) ? ;

    No (0.00s cpu)
    

See Also

store / 1, local / 1