Strings in opposite to numeric values are lines of letters. This text is a string. Within the syntax of Xpressionist lines of text are normally interpreted as commands in your expressions. If you don't want a line of text to be interpreted as an instruction you mark it as a comment. Strings are neither commands nor comments. To tell Xpressionist that a word that you type is a string you have to put it in double quotes " ":
"this is a string"
You can use the + operator to add strings to each other:
"This is" + " a string" = "This is a string";
Strings are useful for printing commands and for string variables.
String variables
A string variable is a container for a word and is indicated with a $ sign:
$a = "Hello world";
whenever $a is used in the expression, Xpressionist inserts the string "hello world" at the position of the variable. So, if you use an object:
$a.Position = vec( 1,1,1 );
Xpressionist actually looks for the position channel of an object called "Hello_world".
|