Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Note
titlePersistent Variables are Like Databases

You should beware that you don't treat persistent variables the same way you treat regular variables. In particular, take note that persistence implies that the values for persistent variables are stored in a database. You cannot copy a persistent variable by reference, only by value. Use caution when manipulating large data structures in persistent variables since you may end up copying the values multiple times, making your program very slow.

Persistent variables take four forms:

...

variables can be numbers, strings, arrays, or maps, and admit operations on those values.

Historically KRL also had special persistent variables that acted as flags, counters, and trails (stacks). These are deprecated and should not be used. 

The following section show how persistent variables are used in various parts of a rule. 

Child pages (Children Display)

...