Naming Conventions


This discusses the conventions for naming functions, macros, structures, and variables within the ext environment. The objective of these conventions is for a name to be canonical and to completely identify its type and scope. Adhering to these conventions is necessary for the ext tools to work.

When names are longer than one English word, the words are catenated and their first letters capitalized, e.g., ThisIsALongExample. This is shorter than other styles, and is at least as readable.

The environment defines three scopes, each of which has its own naming convention:

Functions and macros, variables, and structures each have their own naming convention:

The table below gives examples of names.

External Internal Local
Functions, Macros Rng_RangeReadLower RngRangeReadLower ReadLower
Variables rng_numRanges rngNumRanges numRanges
Structures Rng_IntRange_t RngIntRange_t IntRange_t
Enumerated types Rng_FastMethod_c RngFastMethod_c FastMethod_c
Constants RNG_MAX_INT RNGMAX_INT MAX_INT