home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 December
/
simtel1292_SIMTEL_1292_Walnut_Creek.iso
/
msdos
/
statstcs
/
copyfix.arc
/
COPYFIX.DOC
< prev
next >
Wrap
Text File
|
1989-07-24
|
3KB
|
46 lines
COPYFIX.BAS vs. 1.0 by Jim Groeneveld, 24 July 1989.
-----------------------------------------------------------------------------
NIPG TNO - - - - - <work> - - - - -|- <home> - - - - -| GROENEVELD@HDETNO51
Postbus 124 | Wassenaarseweg 56 | Schoolweg 14 | JIM%RULTNO@HDETNO51
2300 AC Leiden | 2333 AL Leiden | 8071 BC Nunspeet | TNOSUR::GROENEVELD
Nederland (NL) 071-178810 | 03412-60413 | RULTNO::JIM
-----------------------------------------------------------------------------
DESCRIPTION / PURPOSE
---------------------
COPYFIX converts any ASCII data or text file by adding end-of-line characters
(CR/LF) after any (without restriction) specified number of characters
(columns). Original (data or text) file may contain records with unlimited
lengths. Already present EOL characters (CR/LF) may be included (both with and
without synchronization) or excluded. Only meaningful with fixed formatted
data. No file contents other than CRLF are changed.
COPYFIX can carry out 3 different tasks:
1. in/excl.: reformat an (ascii) database with fixed length records but
without embedded EOL characters into a database with equal
length records, separated by CR/LF's;
2. include : reformat an (ascii) database with (equal length) records, one
(or a few) record(s) per case, separated by CR/LF's into a
database with multiple (shorter) records per case;
3. exclude : reformat an (ascii) database with multiple (short) records per
case into a database with (less or) one (larger) record(s) per
case.
'Infinite' length records (a file of one 'record' without any EOL) may also
be read and written (only limited by the amount of disk space available).
LINE INPUT in GWBASIC
---------------------
In GWBASIC a LINE INPUT reads at most 255 characters within ONE line. If 255
characters are read any following CRLF has not been encountered yet. Any
succeeding LINE INPUT will start from the point where the previous LINE INPUT
was left. If still more than 255 characters are to be read only 255 will be
read, leaving the rest for the eventual next LINE INPUT. If less than 255
characters on the SAME line are to be read, even if only a remaining CRLF, they
are ALL read, INCLUDING the CRLF, but the CRLF are NOT part of the read STRING.
Any following LINE INPUT starts with the NEXT line. If another BASIC (e.g.
BASICA, according to its manual) processes LINE INPUT in a different way the
course of this program may be unpredicted and erroneous, so BE AWARE of your
BASIC version! The number of characters read by a LINE INPUT statement may be
changed ONLY IF NECESSARY by redefining the BASIC variable MAX.LINE.INPUT.LENGTH
in program line 70.