From Creatures Wikia

Jump to: navigation, search

VAxx is the name given to a family of CAOS commands which represent variables.

The VAxx family are variables which are local to the script running. There are 100 of them, named from VA00 through to VA99. When a script begins running, they are initially all 0 (integer type), but can be assigned any value.

Because they are local, they cannot be used to share information about state between the scripts of an agent, or between agents. Commands like MESG WRIT and CALL, which allow execution to pass to another script, do not preserve local variables. GSUB, because execution stays inside the script, does. CAOS is a special case: it may or may not preserve VAxx variables depending on an argument.


Playing with some variables (first numbers, then strings):

SETV va00 5
OUTV va00
ADDV va00 10.5
OUTV va00

SETS va01 "Hello, world!"
OUTS va01
  Hello, world!
SETS va02 "\""
ADDS va02 va01
ADDS va02 "\" said Jamie."
OUTS va02
  "Hello world!" said Jamie.

See also

  • Variable gives an overview of the system
  • OVxx and MVxx are non-local variables
  • NAME handles named local variables
Personal tools