Characters (j.3.4), Characters (f.3.4 of ansi c standard) – Echelon Neuron C User Manual

Page 252

Advertising
background image

240

Neuron C Language Implementation Characteristics

Characters (J.3.4)

Q: What are the members of the source and execution character sets beyond

what the standard explicitly defines? (Sec. 5.2.1)

A:

The Neuron C character set uses the basic ASCII character encoding for its

source and execution character sets. The Neuron C source character set is the

character set as explicitly defined in the standard. The ASCII carriage return
character (hex 0D) and the ASCII backspace character (hex 08) are both accepted

as white space. The end-of-line character is the ASCII new-line (hex 0A).

Additionally, the Neuron C compiler accepts the remaining basic ASCII printable
characters @ (at-sign) and ` (accent-grave) in character constants and string

literals.

The Neuron C compiler interprets the ASCII EOT character (hex 04) as an end-

of-file marker. Likewise, the character Ctrl-Z (hex 1A), which is the MS-DOS

end-of-text-file character, is an end-of-file marker. However, neither of these
characters is

required

by the Neuron C compiler.

The execution character set is intended to be basic ASCII (character values

0 .. 127). However, a program written in Neuron C is free to use any
interpretation of character values outside the range 0 .. 127.

Q: What is the mapping of the members of the source character set (in character

constants and string literals) to members of the execution character set? (Sec.

6.4.4.4, Sec. 5.1.1.2)

A:

The mapping from the source character set to the execution character set is

the identity relationship.

Q: What is the value of an integer character constant that contains a character

or an escape sequence not represented in the basic execution character set or the

extended character set for a wide character constant? (Sec. 6.4.4.4)

A:

An integer character constant can only contain characters in the basic

execution character set.

With escape sequences, character constants can be

constructed ranging from 0 to 255, or if signed chars are used, ranging from -128

(\x80) through 127 (\x7F).

Q: What is the value of an integer character constant that contains more than

one multibyte character? What is the current locale used to convert multibyte

characters into corresponding wide characters (codes) for a wide character

constant? (Sec. 6.4.4.4)

A:

The Neuron C compiler does not implement multibyte characters.

Q: Does a “plain”

char

have the same range of values as

signed char

or

unsigned

char

? (Sec. 6.2.5, Sec. 6.3.1.1)

A:

A “plain” char is identical to an unsigned char.

Characters (F.3.4 of ANSI C Standard)

Q: What are the shift states used for the encoding of multibyte characters? (Sec.

2.2.1.2)

A:

Neuron C does not support multibyte characters. Character constants

containing more than one character are errors.

Advertising