Wednesday 18 April 2012

Variable Names






A variable name is any combination of 1 to 31 alphabets, digits or underscores.

Rules for Constructing Variable Names

Some compilers allow variable names up to the length of 247 characters. But, try to use up to 31 characters. It will be safer.

The first character in the variable name must be an alphabet or underscore.
Commas or Blanks are not allowed in the Variable Names.
Uppercase and lowercase are significant. Their values are different.
Variable's name should not be a keyword. (Will teach in my next post)
No special symbol other than underscore can be used.
Ex.: li_ert
      n_cat
      gaj_j_52



0 comments: