Casing
As long as the official 4GL/ABL Documentation uses upper case keywords we use upper case keywords. Developers need to pay attention on casing, "the editor did not provide the proper case" is not an excuse.
...
Code Block |
---|
USING System.Windows.Forms.* FROM ASSEMBLY .
DEFINE BUTTON btnOk NO-UNDO . /* defines an ABL Button Widget */
DEFINE VARIABLE btnOk AS Button NO-UNDO . /* defines a .NET Button */ |
Abbreviations
Bad Examples:
Code Block |
---|
Def var i as i NO-UNDO.
Disp i .
|
4GL/ABL keywords must be written out unabbreviated. Always uppercase 4GL/ABL keywords.
It’s more readable for human
It’s more readable for tools (easier to search and replace)
It’s more aligned with OpenEdge documentation and samples (except those published by Progress Software recently with the OERA samples)
Code Block |
---|
DEFINE VARIABLE i AS INTEGER NO-UNDO .
DISPLAY i .
|
There are a few ABL keywords where the ABL documentation obviously provides an abbreviated form. One example is the RCODE-INFO system-handle. This appears to be an abbreviation for RCODE-INFORMATION.
It is considered good practice to use the documented form and not the undocumented form in cases like this.