home *** CD-ROM | disk | FTP | other *** search
- ▄▄▄▄▄▄▄▄▄▄▄▄▄▄
- █ TP6SB 1.01 █
- ▀▀▀▀▀▀▀▀▀▀▀▀▀▀
-
- TP6SB 1.01 is a Source Butifier for Turbo Pascal (up to Version 6.0)
- sources. 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
-
- TP6SB is NOT a FreeWare. You may try it for 21 days before registering.
-
- Turbo Pascal is a trademark of Borland International.
-
-
-
- ════════════════════════════════════════════════════════════════════════════
-
-
- Introduction
- ────────────
-
- TP6SB is a useful tool with many options to format Pascal code in a
- consistent form. TP6SB uses default values to reformat the source
- code, but with the options you can develop some other shape. It
- makes your code OPTICALLY beautiful.
-
- TP6SB - if you want - makes keyword conversion (lower, mixed, upper
- case or according to your own pattern).
- TP6SB - if you want - structures loops.
- TP6SB - if you want - arranges record and object structures.
- TP6SB - if you want - sets the length of source code line.
- TP6SB - if you want - inserts space characters to make your source
- code better readable.
-
- But TP6SB does not check for syntax errors.
-
- The original source file will be saved as a *.BAK backup file.
- You don't use .BAK, .TPU, .EXE, .COM or .OBJ files as input.
- If you don't use extension after the input file name, .PAS will
- be added. Standard wildcards may be used.
-
- TP6SB 1.01 recognizes following builtin keywords:
- 85 functions
- 138 procedures
- 62 reserved words
- 33 types
- 226 variables and constants
-
-
-
-
- ════════════════════════════════════════════════════════════════════════════
-
-
- Using TP6SB Optionen
- ────────────────────
-
- Syntax:
-
- TP6SB [options] source[.PAS]
- options are:
- -a : about TP6SB
- -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> : 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-20 character(s)
- contents of line from # ignored, builtin words will be overwritten
- -p:<u|l> : procedures in upper or lower case, default is mixed case
- -r:<u|l> : 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> : types in upper or lower case, default is mixed case
- -v:<u|l> : variables in upper or lower case, default is mixed case
- -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 ' ' will not alter.
-
- Options:
- ────────
-
- -a Gives you a short info about TP6SB.
-
- -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.
-
- TP6SB -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 in the file may
- be updated by a command line. You may save all options in the
- file except -a, -b:<f|p|r|t|v> and -c:file. If 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:
-
- TP6SB -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.
-
- TP6SB -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.
-
- TP6SB -r:u -t:l -v:u mysource.pas
-
- -k keep source compact
- If you use this option, the TP6SB will not insert space characters,
- will not structure record and object definitions.
- If mysource.pas look 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;
-
- Tp6SB will not make:
-
- {TP6SB 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:
-
- {TP6SB -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. TP6SB 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 20 characters.
-
- If mywords.txt is:
-
- MyFunction MyCONSTANT
- #WRITEln
- writeLN, MYvar
-
- You may use:
-
- TP6SB -o:mywords.txt mysource.pas
-
- -s:m length of line in the source code
- Default (max.) value is 255 characters, the source may not make the
- source shorter than 40 characters.
-
- TP6SB -s:120 mysource.pas
-
- -w no converting builtin keywords
- But you may use your own words and all other functions.
-
- TP6SB -w mysource.pas
-
- -y:z position of lines beginning with { or (* character(s)
- If 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.
-
- TP6SB -y:1 mysource.pas
-
- ════════════════════════════════════════════════════════════════════════════
-
-