Home
Variables should comply with a naming convention
Description
The PowerBuilder code rule "Variables should comply with a naming convention" states that all variables used in a PowerBuilder application should be named according to a specific set of guidelines. This helps to ensure that all variables are easily identifiable and that they are used consistently throughout the code. The naming convention should specify the type of variable (e.g. integer, string, etc.), the length of the variable (if applicable), and any other specific requirements that may be applicable to the variable. By following a consistent naming convention, developers can ensure that their code is more organized, readable, and maintainable.
Key Benefits
- Ease of Maintenance: Using a consistent naming convention makes it easier to maintain code by providing a consistent structure for variable names.
- Prevent Confusion: Consistent naming conventions help to prevent confusion and errors when reading code, as the reader can quickly identify the purpose of the variable.
- Reduce Errors: Using a consistent naming convention reduces the chances of errors due to typos or incorrect assumptions about the purpose of the variable.
Non-compliant Code Example
private function string rule59InValidTest ()
string badVariable_ = "test" //Non compliant code
return badVariable_
end function