Try OpenEdge Now
skip to main content
ABL Essentials
Using Basic ABL Constructs : Using program variables and data types : Variable naming conventions
 

Variable naming conventions

There are no specific naming requirements for variables, but there are some recommended guidelines that will bring your own variables into line with the standards used in the OpenEdge development tools and their support code.
You should begin a variable with a lowercase letter (or sometimes two) to indicate the data type of the variable. This can help those reading your code to understand at a glance how a variable is being used. When you start doing more dynamic programming later on, it is very important to differentiate between a variable that represents a value directly, and one that is a handle to an object that has a value. Here are some recommended data type prefixes:
*c for CHARACTER
*i for INTEGER
*f for DECIMAL (think float)
*d for DATE
*h for HANDLE
*l for LOGICAL
The rest of the name should be in mixed case, where capital letters are used to identify different words or subparts of a name, as in cCustName or iOrderCount.