In Specware, Char literals are built-in. The syntax is C-like:
(equal c 'K') Here is a sample of the different Char literals;
note that @ and \ require special treatment. Also, see the Specweb page for
CHAR.
spec char-literal-use is
axiom (equal chr 'c')
axiom (equal chr 'C')
axiom (equal chr '\@')
axiom (equal chr '\\')
axiom (equal chr ''')
axiom (equal chr '`')
axiom (equal chr ' ')
axiom (equal chr '.')
axiom (equal chr '
')
axiom (equal chr '0')
axiom (equal chr '!')
axiom (equal chr '#')
axiom (equal chr '$')
axiom (equal chr '%')
axiom (equal chr '&')
axiom (equal chr '(')
axiom (equal chr ')')
axiom (equal chr '*')
axiom (equal chr '+')
axiom (equal chr ',')
axiom (equal chr '-')
axiom (equal chr '/')
axiom (equal chr ':')
axiom (equal chr ';')
axiom (equal chr '<')
axiom (equal chr '=')
axiom (equal chr '>')
axiom (equal chr '?')
axiom (equal chr '[')
axiom (equal chr ']')
axiom (equal chr '^')
axiom (equal chr '_')
axiom (equal chr '{')
axiom (equal chr '|')
axiom (equal chr '}')
axiom (equal chr '~')
axiom (equal chr '"')
end-spec