MQL4 Reference Language Basics Data Types String Type
String TypeThe string type is used for storing text strings. A text string is a sequence of characters in the Unicode format with the final zero at the end of it. A string constant can be assigned to a string variable. A string constant is a sequence of Unicode characters enclosed in double quotes: "This is a string constant". If you need to include a double quote (") into a string, the backslash character (\) must be put before it. Any special character constants can be written in a string, if the backslash character (\) is typed before them. Examples:
To make the source code readable, long constant strings can be split into parts without addition operation. During compilation, these parts will be combined into one long string:
Internal representation of the string type is a structure of 12 bytes long:
See also Conversion Functions, String Functions, FileOpen(), FileReadString(), FileWriteString() |