Next: Numbers, Up: Data constants [Contents][Index]
There are four syntactic forms for atoms. The reserved words are not atoms and if you accidentally use a reserved word as an atom the parser will produce a syntax error.
_
" and alphanumeric characters.percy_smith_2 semester_1
|-/+*<=>#@$\^&~:.?
For example:
@<=
'
" (single quote). Single quote can be included in the sequence by writing the quote twice. "\
" indicates an escape sequence, where the escape characters are case insensitive. The possible escape characters are:
newline
Meaning: Continuation ^
Meaning: Same as d
.^character
Meaning: Control character. dd
Meaning: A two digit octal number. a
Meaning: Alarm ( ASCII = 7
).b
Meaning: Backspace ( ASCII = 8
).c
Meaning: Continuation. d
Meaning: Delete ( ASCII = 127
).e
Meaning: Escape ( ASCII = 27
).f
Meaning: Formfeed ( ASCII = 12
).n
Meaning: Newline ( ASCII = 10
).odd
Meaning: A two digits octal number. r
Meaning: Return ( ASCII = 13
)s
Meaning: Space ( ASCII = 32
).t
Meaning: Horizontal tab ( ASCII = 9
).v
Meaning: Vertical tab ( ASCII = 11
).xdd
Meaning: A two digit hexadecimal number.
Here are a few examples of quoted atoms.
'hi!' 'they''re' '\n'