\newpage
\subsubsection{Persistent assignments}
The next few examples use a variation of the basic \tcc{}
technique of persistent tells to maintain defaults in the face of
change. 

The basic idea can be explained schematically by a simple
example. Suppose we would like to implement the requirement that
{\tt X} should be constrained to be {\tt 2} unless stated
otherwise. Under the assumption that agents wanting to alter the
value of {\tt X} can declare their intention to do so at least
one step in advance, the following technique will work. 

The agent that wishes to change the value of {\tt X} must declare
its intention by, say, asserting the token {\tt changing(X)}. The
persistence of the default value is then maintained by the agent
{\tt default(X,M)} defined by: 
\begin{ccprogram}
\agent default(X, M) :: watching(changing(X), always\ \{X=M\})..
\end{ccprogram}

Once {\tt changing(X)} is asserted, the asserting agent is
guaranteed that the default will not be in effect at the next
time instant. It may now establish its own constraints on {\tt
X}, including, perhaps, establishing a default for it:
\begin{ccprogram}
\agent change(X, N) :: [\{changing(X)\}, next\ default(X, N)]..
\end{ccprogram}
This basic technique may be extended in all sorts of
application-dependent ways using the power of \tcc{} combinators.
For example, using {\tt clock}, defaults may be specified to hold
exactly during the clock ticks supplied by some arbitrary basic
process.




