BECOM - BEtter COde Maker - is a group of programs written on P4GL and available in source-codes, which suppose to make your P4GL code looking better, more clear, readable and understandable. It has several different groups of modules - main modules group (common for everyone and everywhere), rules group (actual programs modifying the source code), and setup group (becom.ini file).
BECOM is an open to expand/update its functionality program. You can do it modifying/adding files of the rules group and reconfiguring the becom.ini file.
Any feedback is welcome: ysetko@progress-plus.com
(and changes history)
v.1.03.04, Nov 12, 2003
v.1.03.03, Oct 02, 2003
v.1.03.02, Jul 21, 2003
v.1.03.01, Apr 01, 2003
v1.03.00, Mar 30, 2003:
v1.02.02, Feb 10, 2003:
v1.02.01, Jan 20, 2003:
v1.02.00, Jan 16, 2003:
v1.01.01, Dec 09, 2002:
v1.01.00, Dec 06, 2002:
Initial Version v1.00.00, Dec 04, 2002:
| Splits line containing more than one statement: |
MESSAGE “a”. RETURN. will be:
MESSAGE “a”.
RETURN.
|
| changes P4GL statements case to upper-case or to the lower-case: |
Define Variable a as int. will be: DEFINE VARIABLE a AS INTEGER. or:
define variable a as integer.
|
| adds/removes spaces before/after brackets ( ) [ ] and commas |
cStr = getStr(sourceStr,iParam[i], getNextLineNum(iLineNum)).
|
| replaces short keywords by its full name: |
def var a as int. will be:
DEFINE VARIABLE a AS INTEGER.
|
| aligns source-code blocks: |
DO WHILE i < 10: |
| aligns IF/THEN/ELSE statements: |
IF YES THEN DO: MESSAGE "a". END. ELSE IF YES THEN MESSAGE "b". ELSE MESSAGE "c". |
| aligns data definition code sections: |
def input param s-value as char no-undo. |
| splits long source-code lines into the several short lines: |
run CheckField(buffer xattr,if wh:screen-value = "?" then "" else wh:screen-value,input-output err-msg,output ferr).
|
| removes pseudocomments from the source-code: |
{{&postfind}{&*} &norepaint=/*}
will be:
{{&postfind}{&*} &norepaint=”/*”}
|
| adds NO-UNDO to DEFINE VARIABLE and DEFINE PARAMETER statements: |
This code: DEFINE INPUT PARAMETER cMode AS CHARACTER. DEFINE VARIABLE lAddNO-UNDO AS LOGICAL INIT TRUE. DEFINE VARIABLE cCodeCase AS CHARACTER. DEFINE VARIABLE cmyUndoVariable AS CHARACTER. /* SKIP-NO-UNDO */ will be replaced by: DEFINE INPUT PARAMETER cMode AS CHARACTER NO-UNDO. DEFINE VARIABLE lAddNO-UNDO AS LOGICAL NO-UNDO INITIAL TRUE. DEFINE VARIABLE cCodeCase AS CHARACTER NO-UNDO. DEFINE VARIABLE cmyUndoVariable AS CHARACTER. /* SKIP-NO-UNDO */ |



Tested so far on Win NT, Win 2000, Progress v9.1.
You can always download the latest available BECOM version from here :
http://www.progress-plus.com/dnld.htm
Subscribe also to BECOM e-mail list about the new releases, bugs reports, users' opinions etc. :
http://www.progress-plus.com/emaillists.htm
Since June 11, 2003 BECOM is integrated into KSV Editor and can be installed as one single pre configured package from http://www.bulklodd.ru/ksvedit/ .
Most of the BECOM source-code is formatted by BECOM.
If you have a bug fixed or a new rule written, please send me a copy of what you have done. I'll include it into the BECOM distributive along with your name as the author of the changes done.
PRO4m - Progress Applications/Databases Analysis and Reengeneering
ProAppmon - Progress Applications Monitoring
KTEST - Progress 4GL, Database design and many more online tests
- all available on http://www.progress-plus.com