String Data Type

Strings are text, made up of arrays of characters. String constants may be made up of text enclosed in double quotes ("").

Inside a string constant, backslash is used to escape characters that may have special meaning, and characters that may not be easily represented by themselves. Prime example of escaping: Since double quote is used as a marker for the start and the end of a text string, how would you represent that double quote character inside the text? The answer is to escape it with a backslash. The following string constant

    "She said \"ouch!\""

would be interpreted as the string

    She said "ouch!"
The backslash may be used to encode other characters as well. The following table describes valid escapes in Basus:
\b Backspace, ASCII 8
\t Horizontal tab, ASCII 9
\n no.shhsoft.fiverow.Line feed, ASCII 10
\r Carriage return, ASCII 13
\\ Backslash

Backslash followed by any other character will represent the following character itself. As seen in the table above, this means that a backslash character inside a string must be represented by two consecutive backslashes.