Quantcast
Channel: Beyond web Logs
Viewing all articles
Browse latest Browse all 90

Rules for Naming Variables

$
0
0

Follow these rules when naming variables:

  • A variable name must be of the form $name or ${name}.
  • The string name can consist of letters (a-z and A-Z), numbers (0-9), and underscore characters (_).
  • The first character of name must be an alphabetic character (a-z or A-Z).
  • If the ${name} form is used, spaces can also appear in name. This allows you to use multiple word names without the underscore character.
  • C language is case sensitive so best practice is have lower case of variable names.
  • Reserved names can’t be variables.

Viewing all articles
Browse latest Browse all 90

Trending Articles