Sfairadora

  • Reference Guide

Text Constants

Character Constants

Constants of the type Char are written as a single character enclosed in single quotes (apostrophes). For instance: 'A'.

String Constants

Constants of the type String are enclosed in double quotes. For instance: "a string constant".

Special Characters

If a quote or other special character is to be written in a character or string constant, it is introduced with the back apostrophe character (` – the character is placed beneath the Esc on the keyboard) followed by a character as described below. (The back apostrophe is used instead of a more common backslash in order to prevent problems with writing file names, where the backslash is used to separate folder names).
`a alert
(ASCII 7)
`b back space
(ASCII 8)
`f form feed
(ASCII 12)
`n new line
(ASCII 10)
`r carriage return
(ASCII 13)
`t tab
(ASCII 9)
`v vertical tab
(ASCII 11)
``
one back apostrophe
`'
apostrophe (must be used within character constants)
`"
double quotes (must be used within string constants)
`NNN
a character with the specified code. NNN is up to three digit decimal number. (E.g. "`13" is the same as "`r").
`xHH
a character with the specified code. HH is one- or two-digit hexadecimal number (Např. "`xD" is the same as "`r".
`oOOO
a character with the specified code. OOO is up to three digit octal number.