To be useful, persistent variables must be mutated. Persistents can only be mutated in the postlude.
The following statements mutate persistent variables:
clear <pvar>
. This deletes the persistent variable<pvar>
.<pvar> := <expr>
. This assigns the value of <expr> to <pvar>.
If the persistent variable is bound to a complex data structure (i.e. maps and arrays),
<pvar>
can contain a hash path referencing part of the structure. Example
fired { ent:a := 1; app:b{"foo"} := 1 + my_var.defaultsTo(0); app:b{["flip", "flop"]} := "this is a string"; ent:c := null clear ent:a }