Character Constants; Table 2.1: Escape Characters - Texas Instruments TI-89 Software Manual

Sierra c assembler
Hide thumbs Also See for TI-89:
Table of Contents

Advertisement

56
2.7.4.

Character Constants

A character constant is a sequence of up to four characters enclosed in single
quotes ('). Characters that cannot be entered directly or conveniently into the
source program, such as nongraphic characters, can be specified in a character
constant using an escape sequence. Table 2.1 lists the available escape
sequences and their values.
Character constants have type int. The value of each character in a character
constant is its integer encoding in the ASCII character set or the value of its
associated escape sequence, whichever is applicable.
The double quote (") and the question mark (?) can be specified directly or with
their escape sequences. The single quote (') and the backslash (\), however,
must be specified with their escape sequences.
In the octal and hexadecimal escape sequences, ooo represents up to three
octal digits and hhh represents up to three hexadecimal digits. These digit
sequences are terminated with the third digit or the first nonoctal (or
nonhexadecimal) character. The specified digits determine the value of the
character.
Escape Sequence
\a
\b
\f
\n
\r
\t
\v
\'
\"
\?
\\
\ ooo
\x hhh
Some integer values that can be represented using three octal or hexadecimal
digits will not fit into a single eight-bit character. When a value does not fit into
eight bits, it is masked with the value 0xFF to force it to fit into eight bits. The
construct ' \x123 ' is a character constant containing a single character. To
TI-89 / TI-92 Plus Sierra C Assembler Reference Manual
Common Name
alert (bell)
backspace
form feed
newline
carriage return
horizontal tab
vertical tab
single quote
double quote
question mark
backslash
octal escape code
hexadecimal escape code

Table 2.1: Escape Characters

Not for Distribution
Section 2: Compiler
Integer Value
0x7
0x8
0xC
0xA
0xD
0x9
0xB
0x27
0x22
0x3F
0x5C
0 ooo (masked with 0xFF)
0x hhh (masked with 0xFF)
Beta Version February 2, 2001

Hide quick links:

Advertisement

Table of Contents
loading

This manual is also suitable for:

Ti-92 plusTi-89 plusTi-92 plus

Table of Contents