Apama 10.3.1 | Apama Documentation | 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.

Copyright © 2013-2019 | Software AG, Darmstadt, Germany and/or Software AG USA, Inc., Reston, VA, USA, and/or its subsidiaries and/or its affiliates and/or their licensors.