Apama 10.15.0 | Developing Apama Applications | EPL Reference | Lexical Elements | Literals | String literals
 
String literals
A string literal is a sequence of characters enclosed in double quotes.
The backslash character is used as an escape character to allow inclusion of special characters such as newlines and horizontal tabs.
To include a double quote in a string literal, precede it with a \ character which serves as an escape character, which means "do not treat this quote as the end of the string literal".
To include a newline, use \n.
To include a tab character, use \t.
To include a single \ character, use two: \\. The compiler will remove the extra backslashes.
Examples:
s := "Hello, World!";
s := "\ta\tstring\twith\ttabs\tbetween\twords";
s := "a string on\n two lines";
s := "a string with \\ a backslash and a \" quote";
The length of a string literal is limited only by available memory at compile time and runtime. In practice, this means you can make them as long as you need.