Places
Home
Graphs
Prefixes
Admin
Users
Settings
Plugins
Statistics
CPACK
Home
List packs
Submit pack
Repository
Load local file
Load from HTTP
Load from library
Remove triples
Clear repository
Query
YASGUI SPARQL Editor
Simple Form
SWISH Prolog shell
Help
Documentation
Tutorial
Roadmap
HTTP Services
Login
4.14.3 Flags
All
Application
Manual
Name
Summary
Help
Documentation
Reference manual
Built-in Predicates
Database
Flags
get_flag/2
set_flag/2
flag/3
Packages
Availability:
built-in
flag
(
+Key, -Old, +New
)
True when
Old
is the current value of the flag
Key
and the flag has been set to
New
.
New
can be an arithmetic expression. The update is
atomic
. This predicate can be used to create a
shared
global counter as illustrated in the example below.
next_id(Id) :- flag(my_id, Id, Id+1).
ClioPatria
(version
V3.1.1-51-ga0b30a5
)