Mel - Maya Embedded Language

string

A string variable is a series of text characters. The default value of a string is empty.
string $myEmptystring;
string $myString = "Hello there my furry friend";
A nice thing about text is that you can join several variables together to make a longer piece of text. The technical term for this action is to Concatenate. Let's look at an example of this.
string $empty;
string $firstText = "Hello there";
string $secondText = " my furry friend";

$empty = "The combined sentence is: " + $firstText + $secondText;

print $empty;
The combined sentence is: Hello there my furry friend
	
Notice that when I used a variable with in my code that I started it off with the $ sign.
To use special characters in a string you want to use a "\". Special characters include.
\n newline
\t tab
\r carriage return
\\ backslash character
It is improtant to remember if we are trying to navigate directories that we use the "\\" in our string variables.
"C:\maya"

would be written as

"C:\\maya"