String Variable Type

The string variable type is used for representing text. A string consists of a sequence of zero or more 8-bit elements. This means that characters are best encoded in either ASCII or UTF-8.

Declaring a String

To declare a string type, use the following:

STRING stringVariable, variable2;

This will define an arbitrary length string. N.B. The length of the string is not required, as the string will change its length to match the length of its contents.

String values can be assigned at definition:

STRING assignedStringVar := "Hello World\n";

The string type can contain special symbols, similar to those used in the C programming language (e.g. \n for newline). These are further described in Literals.