Next: , Up: Data constants   [Contents][Index]


3.1.1 Atoms

There are four syntactic forms for atoms.

  1. A lower case letter followed by any sequence consisting of "_" and alphanumeric characters.
    For example:
    percy_smith_2
    semester_1
    
  2. Any combination of the following set of graphic characters.
    |-/+*<=>#@$\^&~:.?
    

    For example:

    @<=
    
  3. Any sequence of characters enclosed by "'" (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:
    newlineMeaning: Continuation
    ^Meaning: Same as d.
    ^characterMeaning: Control character.
    ddMeaning: A two digit octal number.
    aMeaning: Alarm (ASCII = 7).
    bMeaning: Backspace (ASCII = 8).
    cMeaning: Continuation.
    dMeaning: Delete (ASCII = 127).
    eMeaning: Escape (ASCII = 27).
    fMeaning: Formfeed (ASCII = 12).
    nMeaning: Newline (ASCII = 10).
    oddMeaning: A two digits octal number.
    rMeaning: Return (ASCII = 13)
    sMeaning: Space (ASCII = 32).
    tMeaning: Horizontal tab (ASCII = 9).
    vMeaning: Vertical tab (ASCII = 11).
    xddMeaning: A two digit hexadecimal number.

    Here are a few examples of quoted atoms.

    'hi!'
    'they''re'
    '\n'