C - C+ Character Sets With the recent standardization of...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
C++ Character Sets With the recent standardization of C++, it's useful to review some of the mechanisms included in the language for dealing with character sets. This might seem like a very simple issue, but there are some complexities to contend with. The first idea to consider is the notion of a "basic source character set" in C++. This is defined to be: all ASCII printing characters 041 - 0177, save for @ $ ` DEL space horizontal tab vertical tab form feed newline or 96 characters in all. These are the characters used to compose a C++ source program. Some national character sets, such as the European ISO-646 one, use some of these character positions for other letters. The ASCII characters so affected are: [ ] { } | \ To get around this problem, C++ defines trigraph sequences that can be used to represent these characters: [ ??( ] ??) { ??< } ??> | ??! \ ??/ # ??= ^ ??' ~ ??- Trigraph sequences are mapped to the corresponding basic source character early in the compilation process. C++ also has the notion of "alternative tokens", that can be used to replace tokens
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Page1 / 3

C - C+ Character Sets With the recent standardization of...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online