Jump To Content

LearnHub




What is an Identifier?

Before you can do anything in any language,you must at least know how you name an identifier. An identifier is used for any variable ,function, data defintion etc. In the programming language C, an identifier is a combination of alpha numeric characters, the first being the letter of an alphabet or an underline, and the remaining being any letter of the alphabet, any numeric digit, or the underline. Two rules must be kept in mind while naming an identifier.

1. The case of the alphabetic character is significant. Using "INDEX" for a variable is not the same as using "index" and neither of them is the same as using "InDex" for a variable. All three refer to different variables.

2. As C is defined, up to eight significant characters can be used and will be considered significant. If more than eight are used, they may be ignored by the compiler. The HiTech C compiler used with the Applix 1616 alllows 31 significant characters, and prepends an underscore ( _ ).

It should be pointed out that some C compilers allows use of a dollar sign in an identifier name, but since it is not universal, it will not be used anywhere in this tutorial. Check your documentation to see if it is permissible for your particular compiler.

Your Comment
Textile is Enabled (View Reference)