ADDS is a CAOS command for string concatenation.


Syntax: ADDS var (string variable) str (string)

Appends str to var.

You can only append strings onto strings, so if you want to append a number you need to use VTOS to get it as a string, first.


You could use this to append something to the text in the text part of a compound object. In the example below we are also combining our own string and something dynamically generated using CAOS.

ADDS va00 "\nWe are currently operating at "
ADDS va00 " ms/tick (ideally!)"
PTXT va00

You might like to make an animation that varies depending on circumstances. One way to do that is to use conditional execution, maybe some variables, and ANIM; another way is to use ADDS and ANMS. So just for instance, say you only want to loop this animation if ov00, which stores some state or other, is 0...

SETS va00 "6 7 8 9 10 11"
DOIF ov00 eq 0
  ADDS va00 " 255"
ANMS va00

There are other examples using ADDS in CAOS and FILE OOPE.

See also

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.