[ Non-logical Variables, Arrays, Bags, Shelves and Stores | Reference Manual | Alphabetic Index ]
current_store(?StoreName)
StoreName is a visible store name
- StoreName
- A variable or a store name (atom or compound)
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: StoreName 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.
Modes and Determinism
- current_store(+) is semidet
- current_store(-) is nondet
Modules
This predicate is sensitive to its module context (tool predicate, see @/2).
Fail Conditions
StoreName is not a visible store name
Exceptions
- (5) type error
- StoreName 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