Home
Forward prototype should not contains duplicate function declarations
Description
The "Forward Prototype Should Not Contain Duplicate Function Declarations" rule states that PowerBuilder code should not contain multiple declarations of the same function within a single forward prototype. This rule is intended to ensure that the code is organized and readable, and that the same function is not declared multiple times in the same forward prototype. If the same function is declared multiple times in the same forward prototype, it can lead to confusion and errors in the code. This rule also helps to ensure that the code is easy to maintain and debug.
Key Benefits
- Eliminates redundant code: By avoiding duplicate function declarations, the code is more concise and easier to read.
- Improves code readability: By eliminating duplicate code, the code is easier to understand and maintain.
- Reduces debugging time: By removing duplicate code, it is easier to find and fix bugs.
- Improves performance: By avoiding duplicate code, the code can be optimized for better performance.
Non-compliant Code Example
forward prototypes public function boolean of_getclosestatus () public function integer of_setresize (boolean ab_switch) public function integer of_setbase (boolean ab_switch) public function integer of_setpreference (boolean ab_switch) protected function integer of_getdwtype (datawindow adw_dw) public function boolean of_getclosestatus () public function integer of_setresize (boolean ab_switch) public function integer of_setbase (boolean ab_switch) public function integer of_setpreference (boolean ab_switch) protected function integer of_getdwtype (datawindow adw_dw) end prototypes