Try OpenEdge Now
skip to main content
Internationalizing Applications
Preparing the Code : Guidelines and methodology : Using variables
 

Using variables

Another programming convention that helps keep application code flexible is isolating regionally specific information and substituting variables for embedded constants. For example, if an application runs a report with labelled columns for each business day, you can store the column characteristics (labels and position) in variables so that your application can adjust to the fact that the definition of a work week varies worldwide.
Avoid hard coding—that is, embedding explicit strings or constants in a program so that you can only change values by changing the source code. Changing the source code, in turn, requires additional testing of each new version.