Visual Basic 2008 Programming: Business Applications with a Design Perspective
Chapter 1 Chapter 2 Chapter 3 Chapter 4 Chapter 5 Chapter 6 Chapter 7 Chapter 8 Chapter 9
Chapter 10 Chapter 11 Chapter 12 Chapter 13 Chapter 14 Appendix A Appendix B Appendix C Home
Last change: February 13 2016 18:48:19.

 Chapter in PDF

Table of Contents

Chapter 4: Data, Operations, and Built-In Functions
Last change: February 13 2016 18:47:36.

Constant and Variable Naming Convention

Some companies also adopt naming conventions for constants and variables in addition to those that they use for controls. The rules for variables typically stipulate that there should be a one-character prefix for the scope, followed by another three-character prefix for the data type. For example, a module level integer variable can have a prefix mint, where m indicates the scope (module level) and int represents its data type. This naming notation is recognized as the Hungarian notation. The purpose of such rules is to enhance the readability of the code.

Some well-known authors, however, maintain that such a practice appears to be overkill, and can make the code extra long by adding an overhead to the coding effort. This textbook will not follow this convention in using variables and constants; however, you should be aware that such a convention does exist.

Last change: February 13 2016 18:47:37.