home *** CD-ROM | disk | FTP | other *** search
- ▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- █ BP7SB 1.01 █
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
- BP7SB 1.01 is a Source Beautifier for Turbo / Borland Pascal sources.
- (up to Version 7.0) Use it only on your own risk!
-
- Please report all bugs and comments to the author:
-
- Jozsef Ferincz
- Bleibtreustr. 32
- D-1000 Berlin 15
- Germany
-
- Phone: +49 30 8835822
- E-Mail: ferincz@chemie.fu-berlin.de
- ferincz@fub.uucp
-
-
- ════════════════════════════════════════════════════════════════════════════
-
-
- Introduction
- ────────────
-
- BP7SB is a useful tool with many options to format Pascal code in a
- consistent form. BP7SB uses default values to reformat the source
- code, but with the options you can develop some other shape. It
- makes your code OPTICALLY beautiful.
-
- BP7SB - if you want - makes keyword conversion (lower, mixed, upper
- case or according to your own pattern).
- BP7SB - if you want - structures loops.
- BP7SB - if you want - arranges record and object structures.
- BP7SB - if you want - sets the length of source code line.
- BP7SB - if you want - inserts space characters to make your source
- code better readable.
-
- But BP7SB does not check for syntax errors.
-
- The original source file will be saved as a *.BAK backup file.
- You don't use .BAK, .COM, .DLL, .EXE, .OBJ, .RES, .TPP, .TPU
- or .TPW files as input. If you don't use extension after the
- input file name, .PAS will be added. Standard wildcards may
- be used.
-
- BP7SB 1.01 recognizes following builtin keywords:
- 739 functions
- 197 procedures
- 62 reserved words
- 94 types
- 409 variables and constants
-
-
- ════════════════════════════════════════════════════════════════════════════
-
-
- Using BP7SB Optionen
- ────────────────────
-
- Syntax:
-
- BP7SB [options] source[.PAS]
- options are:
- -a : about BP7SB
- -b:<f|p|r|t|v> : (one of them) show builtin
- functions or procedures or reserved words or types or variables
- -c:file : get options from a file, separators are <CrLf(EoLn), ,EoF>
- all options are allowed except -a, -b:<f|p|r|t|v> and -c:file
- -d:n : n=depth of loops, default=2, max=10, n=0 => no structuring loops
- -f:<u|l> : builtin functions in upper or lower case, default is mixed case
- -k : keep source compact
- -o:file : file=collection of own words, length of words 1-26 character(s)
- contents of line from # ignored, builtin words will be overwritten
- -p:<u|l> : buitlin procedures in upper or lower case, default is mixed case
- -r:<u|l> : builtin reserved words in upper or lower case, default is mixed case
- -s:m : m=length of line in the source, default(max)=255, min=40
- -t:<u|l> : builtin types in upper or lower case, default is mixed case
- -v:<u|l> : builtin variables, constants in upper or lower case, def. is mixed
- -w : no converting builtin keywords
- -y:z : z=position of lines beginning with { or (*, default is structured
-
- The order of arguments is not significant. The arguments are not
- case sensitive. If you use -a or -b:<f|p|r|t|v> options, you will
- get your information on a standard output and after that the
- program terminates also if you use other command options.
-
- Command options followed by : (colon) must have ONE parameter,
- which will follow immediatelly after the option with no space.
- < > (angle brackets) give you a possible list of option
- parameters which must be present.
-
- Comments in { } or in (* *) and strings in ' ' or " " will not alter.
-
- Options:
- ────────
-
- -a Gives you a short info about BP7SB.
-
- -b:<f|p|r|t|v> Puts the builtin keywords to a standard output.
- The keyword groups are: f-functions, p-procedures, r-reserved words,
- t-types, v-variables and constants. If you will see more than one
- keyword group, you may use this option several times. The following
- exmple gives you all builtin keywords:
-
- BP7SB -b:f -b:p -b:r -b:t -b:v | more
-
- -c:file Like a configurations file.
- You may save the frequently used options in a file. You may use
- the options also in several lines. The contents of line ignored
- from a # character. The separator of options are the space, end
- of line and end of file characters. The options saved in the file
- may updated by a command line. You may save all options in the
- file except -a, -b:<f|p|r|t|v> and -c:file options. If the file
- isn't in the active directory, you should use the complete path.
-
- If myoptions.cfg is:
-
- -d:3 -f:u
- #-y:5
- -y:6
- -r:u
-
- You may use:
-
- BP7SB -c:myoptions.cfg -y:1 mysource.pas
-
- -d:n Switch structuring off or set the depth of stuctures.
- Allowed values of n are between 0 and 10. Default value of n is 2.
- If n is 0, the source code will be not structured, the original
- structure will be kept.
-
- BP7SB -d:3 mysource.pas
-
- -<f|p|r|t|v>:<u|l> Switch case of builtin keywords.
- Default is mixed case: WriteLn. In u-upper case: WRITELN, in l-lower
- case writeln.
-
- BP7SB -r:u -t:l -v:u mysource.pas
-
- -k keep source compact
- If you use this option, the BP7SB will not insert space characters,
- will not structure record and object definitions.
- If mysource.pas looks like:
-
- type
- Date=record
- D,
- M,
- Y:Integer;
- end;
-
- ...
-
- if(a<b)or(c=d)then
- begin
- writeln((a+b)*c,(d^.e-5)/f[(a+b)*g.h]);
- a:=d^.e
- end;
-
- If you use the -k option, BP7SB will not make:
-
- {BP7SB mysource.pas}
- Type
- Date = Record
- D,
- M,
- Y: Integer;
- End;
-
- ...
-
- If (a < b) Or (c = d) Then
- Begin
- WriteLn ( (a + b) * c, (d^. e - 5) / f [ (a + b) * g. h] );
- a := d^. e
- End;
-
- but you will get:
-
- {BP7SB -k mysource.pas}
- Type
- Date=Record
- D,
- M,
- Y:Integer;
- End;
-
- ...
-
- If(a<b)Or(c=d)Then
- Begin
- WriteLn((a+b)*c,(d^.e-5)/f[(a+b)*g.h]);
- a:=d^.e
- End;
-
- -o:file : use collection of own words
- You may give the format of your own words (variables, constants,
- types, functions, procedures, ...) in your source code. You may
- redefinate also the bultin keywords. BP7SB will use this collection
- of own words like the builtin keywords. The words in this file
- may have characters only from [a..z,_,A..Z]. All other characters
- will interpreted as separator of words. If you use one word several
- times, the last version will be used. The contents of line of
- collection file be will ignored from # character. The own words
- may have a maximal length of 26 characters.
-
- If mywords.txt is:
-
- MyFunction MyCONSTANT
- #WRITEln
- writeLN, MYvar
-
- You may use:
-
- BP7SB -o:mywords.txt mysource.pas
-
- -s:m length of line in the source code
- Default (max.) value is 255 characters, BP7SB makes the source not
- shorter than 40 characters.
-
- BP7SB -s:120 mysource.pas
-
- -w no converting builtin keywords
- But you may use your own words and all other functions.
-
- BP7SB -w mysource.pas
-
- -y:z position of lines beginning with { or (* character(s)
- If the line in the source code begins with comment or compiler
- directive, you may definate at which column of source this line
- begins. The numbering of columns begins with 1. If you don't use
- this option, the lines beginning with { or (* character(s) will
- be structured, like other lines.
-
- BP7SB -y:1 mysource.pas
-
-
- ════════════════════════════════════════════════════════════════════════════
-
-