String is any text which is surrounded with double quotes ( " ) or with symbol `.
If you want to put in the string a quotation mark then you have to put instead of it two quotation marks ( "" ) or \". In this way the compiler will understand that you want one quotation mark in the string instead to end it.
If the string is surrounded with the symbol ` then you have not problem to put inside a quotation mark ( " ) or \". In this case if you put "" then this will be exactly two symbols ". To surround the string with the symbol ` instead of " is very convenient when you want to generate HTML file and you have a lot of " inside.
If the string is surrounded with the symbol ` then analogous you have to put instead of ` two symbols ` or \`.
If you want to put in the string special symbol then you have to put instead of it a sequence which starts with \. Here is the table of this special symbols and respective sequences:
\n new line
If you put in your string a line break then the effect will be the same if you wrote \n. If you want to go on a new line without putting line break in the string then you can use \. If you place \ before the line break then this line break symbol will be not included in the string. The following three commands are equivalent:
write("First Line\nSecond Line")
If you write string using write predicate then special symbols will be printed directly. If you use the writeq predicate then all special symbols will be replaced with the respective sequence (which start with \).
To work with strings use the built-in predicates and functions.