home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
DP Tool Club 24
/
CD_ASCQ_24_0995.iso
/
vrac
/
cols14.zip
/
README.TXT
< prev
next >
Wrap
Text File
|
1995-06-22
|
10KB
|
262 lines
The Text Column Architect
COLS
COPYRIGHT (C) 1995 CHUCK BERNT
ALL RIGHTS RESERVED
This program changes the columns in a text file.
* The user can instantly evaluate and compare QBASIC expressions
right from the DOS command line.
* It can swap, add and delete columns in a text file.
* It can total and average (to the screen) any numeric column.
* It can calculate and insert any column that can be expressed
as a QBASIC expression of the other columns (including
logical expressions).
* Text may also be inserted.
* The columns can be defined (delimited) by white spaces, spaces,
tabs, commas or any ASCII character or groups of characters.
* There are no file length limits.
* It has a short cut command line form for power users.
* It can be interrupted at any time by typing CNTRL+BREAK.
---------------------------------------------------------------------
SHORT FORM OR COMMAND LINE FORM
SYNTAX: COLS FILENAME OUTPUTCOL1 [OUTPUTCOL2] ... [OUTPUTCOL8]
WHERE:
FILENAME is the input filespec without the extension
(.TXT is assumed). The output filename will be the
same FILENAME with the extension .LIS
OUTPUTCOL can be any of the following three formats.
1. Any text preceded with a T. The text will be placed
in the respective output column (without the T) in
every output line (no embedded spaces, commas, etc.
in the short form).
2. Any input column number. The input column specified
will be placed in that output column.
3. Any valid QBASIC expression without spaces. Use Cn
to represent input column n. For example C1
represents input column one. All expressions must
contain at least one Cn or C. If your expression
is not a function of the input columns, then add C
to it. C is equal to zero.
SOME EXAMPLES
COLS FUN 1 2 3 TSUM C1+C2+C3
COLS FUN 1 TAVE (C1+C2+C3)/3
COLS FUN 1 TSQUARE C1^2 tbig-one c1^c1
COLS FUN 1 2^C1
I have included the file FUN.TXT so that you can
checkout the above expressions (or any other
expressions). Go ahead and try them out but stay
in the \cols directory for now (the last example
will give you a power of two table). FUN.TXT is
also great for doing side by side comparisons of
two expressions.
The program should have automatically started your
text editor on the output file after it generated
the file. If it didn't start it or it didn't
start your favorite DOS editor, go to the second
to the last line of the batch file (COLS.BAT)
and change the word EDIT to the name of your
preferred DOS editor.
To repeat the last cols command line, just type
"COLS L" or "COLS LAST" (the last command line
used is stored on the disk).
SOME SHORT CUT DEFAULT VALUES AND LIMITATIONS
(Use the long form to avoid these limitations or
you can make batch program adjustments to these
default values.)
1. You may use only legal command line text. No
embedded spaces, commas, equal signs, etc.
2. The input files' column delimiter is set to be
any number of white spaces in the short form.
3. Input file checking is defaulted to "no" in
the short form.
4. Interim status reports are not available in
the short form.
5. You are limited to eight output columns in
the short form.
--------------------------------------------------------------------
LONG FORM
SYNTAX: COLS
The program will ask you questions and then guide you. The
automatic editor start is not available in the long form. Go
ahead and try it but stay in the \cols directory for now.
Well, what do you think? If you feel that you can use it, you can
make the COLS programs available from any directory on you drive.
Just type PATH at the DOS prompt and choose a directory that will
be around for a long time and COPY the COLS.BAT to that directory.
That's it. That's all there is to it.
Please type the directory path below so that you can change the
batch program if you need to later.
PATH TO COLS.BAT =
--------------------------------------------------------------------
REGISTRATION OF THIS SHAREWARE
COLS is offered as shareware and not freeware. You
may use and evaluate this version of COLS for up to
30 days. After this 30 day evaluation period, you must
either register COLS by filling out and mailing in
REGFORM.TXT or remove COLS (including the above COLS.BAT
command) from your hard disk. You may keep it on
floppies or other storage media separate from your
computer as long as you do not use it. The shareware
registration fee is only $5 per simultaneous user.
I am relying on the users' honesty and good will
to make this endeavor viable.
If the response is favorable, I will develop a column-
row interchange program that would then allow control
of both rows and columns by the present COLS program.
I would then make that interchange program available
to those expressing an interest on the COLS REGFORM.
Please feel free to pass on the program to friends,
but please pass on the COLS14.EXE file since it has
all the files your friends will need. Please also
mention to place the COLS14.EXE in the \COLS directory
and to type COLS14 from that directory and then to
read this README.TXT file.
This program is written in QBASIC and will only work on machines
that have QBASIC (MS DOS versions later than 5.0).
If have questions, please contact me at one of the following
addresses.
Chuck Bernt
22365 El Toro Rd., # 118
El Toro, Ca. 92630
U.S.A.
Compuserve: 74761,3356
Internet: 74761.3356@COMPUSERVE.COM
Thank you for evaluating this software.
NOTES:
1. When specifying an input column to place in an output
column, you may also use an expression to select the
input column. For example 2, 1+1, 4/2 and 2^2-2 all
specify the second input column. So be aware if you
forget to include a Cn or a C when you are creating a
column you may end up just copying an input column to
that output column.
2. I have included the file FUNLOGIC.TXT so that you can
compare logic expressions side by side. Unfortunately
QBASIC logic expressions normally use spaces to
to separate operators and variables. Since the command
line does not allow spaces, the variables will need to
be enclosed in parentheses when the command line form is
used. Qbasic uses false = 0 and true = -1. This
creates another problem when trying to get the columns
to line up. If the - in the output file is replaced with
nothing, then the output file columns will line up.
If their is enough interest in logic expressions, I will
remove the - sign requirement in the input and output files.
You may want to check out the following logic expressions
at the command line. Don't forget to remove the minus
signs (or change the 0s to space 0s) in the output file.
SOME EXAMPLES
COLS 2 3 TAND (C2)AND(C3) TOR (C2)OR(C3) TNOT2 NOT(C2)
COLS 1 2 3 TSMALLNET ((C1)OR(C2))AND(C3)
COLS 2 3 TXOR (C2)XOR(C3) TEQV (C2)EQV(C3)
The last example shows that the XOR and the EQV (or
compare) are the complements of each other. You may
evaluate small logic networks using the FUNLOGIC.TXT
file for perfect inspection (all possible inputs) or
create your own input file for partial behavioral
exploration of larger logic networks.
3. The files FUN.TXT AND FUNLOGIC.TXT were included so that
users could quickly explore any expression right from the
DOS command line using the COLS program.
TO QUICKLY EXPLORE AN EXPRESSION FROM THE
DOS COMMAND LINE -- TYPE:
A. CD \COLS
B. COLS FUN 1 2 3 expression
or
COLS FUNLOGIC 1 2 3 expression
TO COMPARE TWO OR MORE EXPRESSIONS:
Just add the expressions to the command line
separating each with a space.
4. At the risk of wasting a little bandwidth, I am
also including two more fun files that might be
helpful.
MOREFUN.TXT is similar to FUN.TXT except
that its three columns increase by powers of ten.
You may want to be careful when you use MOREFUN
since it contains a fair amount of horsepower: the
last values are 10 to the 20 power.
LESSFUN.TXT is the same as FUN.TXT except that all
number are negative. All the fun files stop at 20
rows because that should result in one screen full of
text without the need to scroll through the output
file. You may want to adjust that number.
These fun files may be easier to create using COLS
then the new COLS user might expect.
MOREFUN --> COLS FUN 10^C1 10^C1 10^C1
LESSFUN --> COLS FUN -C1 -C1 -C1