Strings

Strings are a plain sequence of alphanumerical characters - letters, numbers or symbols - which can be used for messages, onscreen menus or the like. They are defined this way:

STRING* name = "characters"; 

Defines a global string pointer with the given name and initializes it to the content characters between double quotation marks. If the character content is spread over several lines, line feeds are automatically inserted.  LC  Note that in lite-C pointers are generally defined with a '*', so the green * is required for lite-C, but must be omitted in C-Script.

Remarks:

Example:

STRING* playername = "Player1";
STRING* welcome = "Welcome to the new game!\n\nEnjoy!";

STRING* name = "#n";

Defines a string pointer initialized to n spaces. Use this for defining long empty strings.

Example:

STRING* sElements = "#100";                                 

STRING name;

Defines an empty, variable length string (C-Script only - in lite-C, STRING* name; would just define an uninitialized string pointer). The length of this string can be changed by str_cpy or str_cat instructions.

Example:

STRING sEmpty; // C-Script only: declare an empty, unlimited string