Case Sensitivity

Although it is not always enforced, it is considered good programming practice to use consistent case when naming your identifiers. The case can be as important as the wording when it comes to naming convention.

For example, we might want a variable to contain the date of an order. Although naming convention permits “orderdate”, “ORDERDATE”, “OrDeRdAtE” and any other combination of capital and lower case letters, the preferred notation is to start each new word of an identifier name with a capital. So for the order date, it is recommended you use “OrderDate”, although some prefer to keep the first letter of the identifier as lower case: “orderDate”.

Naming your identifiers in this way ensures consistency and readability when referring back to them. Any reference to an identifier should match the case of the identifier exactly. You should not attempt to call a function named “LoadHelp” using the word “loadhelp” or any other variation.

The exercises in this guide use the case convention explained above, so you should type all code exactly as it appears. This is good practice for when you start creating expressions of your own.

 

<< Previous: Identifier Naming Convention | Next: Operators >>