Echelon Neuron C User Manual

Page 26

Advertising
background image

14

Overview

include file. Other ANSI C library functions, such as file I/O and storage

allocation functions, are not included in Neuron C. Consult the

Neuron C

Reference Guide

for a complete and detailed list.

• The Neuron C implementation includes three ANSI include files:

<stddef.h>, <stdlib.h>, and <limits.h>.

• Neuron C requires use of the function prototype feature whenever a call

to the function precedes the function definition (see Chapter 2,

Focusing

on a Single Device

, on page 15).

• Neuron C does not support the use of the ellipsis (...) in function

prototypes or definitions.

• Neuron C contains additional reserved words and syntax not found in

ANSI C. See the

Neuron C Reference Guide

for the syntax summary and

the list of reserved words.

• Neuron C supports binary constants in addition to octal and hexadecimal.

Binary constants are specified as 0b

<binary_number>

. For example,

0b1101 equals decimal 13.

• Neuron C supports the // comment style from C++, in addition to the

traditional /* */ C coment style. In the // style, two slashes (//) begin a
comment. The comment is terminated by the end of the line, without

further punctuation.


C code

/* An ANSI C and NEURON C comment */

C code

// A line-style NEURON C comment

• The main( ) construct is not used. Instead, a Neuron C program’s

executable objects consist of when statements in addition to functions. A

thread of execution always begins with a when statement, as described in

Chapter 2,

Focusing on a Single Device

, on page 15.

• Neuron C does not support multiple source files in separate compilation

units (however, the #include directive is supported).

• The ANSI C preprocessor directives #if, #elif, and #line are not supported.

However, #ifdef, #ifndef, #else, and #endif are supported.

• The Neuron C implementation of the #error directive requires a double-

quoted string for the error message; the ANSI C directive does not.

See Appendix D,

Neuron C Language Implementation Characteristics

, on page

237 for a description of how the Neuron C language conforms to “implementation-

specific” aspects of the ISO and ANSI C language definitions.



Advertising