Keywords
Keyword
Keywords are words that have special meaning to the compiler and may not be used as identifiers.

While we have extensive leeway with respect to the names we can use for identifiers, some words cannot under any circumstances be used as identifiers. These are known as "keywords".

ANSI C Keywords

auto break case char
const continue default do
double else enum extern
float for goto if
int long register return
short signed sizeof static
struct switch typedef union
unsigned void volatile while

These 32 keywords have specific meanings in ANSI C and, as such, may not be used for anything other than their intended purpose. In any ANSI C implementation, these keywords will have the exact same meanings which we will explore throughout the rest of this class. However, some compilers deviate from the standard ANSI implementation, resulting in potential differences in the behavior of some keywords.

Some compiler implementations may define additional keywords. While these extra keywords are not part of the ANSI C standard, they will have the same restrictions as the ANSI keywords in their compiler toolchain. The Microchip MPLAB® XC16 compiler, for example, defines 12 additional keywords. These and any other compiler-specific keywords will be covered in the compiler classes.

© 2024 Microchip Technology, Inc.
Notice: ARM and Cortex are the registered trademarks of ARM Limited in the EU and other countries.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.