home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
The World of Computer Software
/
World_Of_Computer_Software-02-385-Vol-1of3.iso
/
e
/
estat21.zip
/
EASIDOC.ZIP
/
ESCHAP16.DOC
< prev
next >
Wrap
Text File
|
1992-06-30
|
8KB
|
199 lines
Chapter 16: THE EDIT PROGRAM
A simple text editor is supplied as the file EDIT.EXE.
This allows plain text or ASCII files to be edited and is
suitable for viewing the documentation and demonstration
example files and can be used to produce and edit data
files, command files, output files and graph files (as
well as DOS batch files and any other ASCII files you may
have belonging to other applications).
Only ordinary letters, digits, symbols and punctuation
are dealt with by EDIT and if you try to use it with a
file produced by a word processor containing special
formatting characters then it will give unpredictable
results. Tab and page break characters are displayed by
the EDIT program (as little smiley faces) but cannot be
entered into files. No word wrap, justification or other
text formatting functions can be carried out. All this
means that EDIT allows you to see exactly what characters
make up a file and how they are laid out. With many word
processors this is not possible because the formatting
characters which are contained in the file are hidden and
do not appear on the screen. This makes EDIT ideal for
editing the accessory files which EASISTAT and EASIGRAF
use, but EDIT's lack of formatting features make it
unsuitable for editing other kinds of file such as
letters and documents for which a standard word processor
should be used. You may also find that EDIT works rather
slowly and is not good for handling very large files.
Many other text editors with more features are available,
some of them Shareware (PC-Write is a good example), and
you may prefer to obtain one of these.
Only a few functions are available in the EDIT program
and it should be possible to work out how to perform most
of these from the descriptions of the menu functions and
the information provided when the F1 key is pressed.
However some brief notes on using the program are
provided below.
16:1. Running EDIT
The EDIT program is run from DOS by entering the command
EDIT. If DOS gives the "Bad command or file name" message
then that means it cannot find the program file called
EDIT.EXE because it is not in the current working
directory and not in one of the subdirectories listed in
the PATH command which should appear in your AUTOEXEC.BAT
file. You should see the sections on installation for
more details of this. To run the EDIT program from within
EASISTAT the command SYSTEM EDIT can be used. (Do not get
confused between the EASISTAT command EDIT, which runs
the full-screen data editor, and the EDIT program, which
is a separate text editor contained in the file
EDIT.EXE.)
You may specify one or more filenames when you run EDIT
e.g.:
118
The EDIT program
EDIT EXAMPLE.DAT
and if you do this then the program will read in this
file and present it for editing. Alternatively you may
provide a DOS file specification with wildcards such as:
EDIT *.DAT
This would cause EDIT to read in every file ending .DAT
in the current working directory. Each file would be in
its own buffer and could be edited separately, and text
could also be transferred between one file and another.
If you wished to view and edit all the batch files and a
file called FRED.DOC on the disk in drive B: you would
enter:
EDIT B:*.BAT B:FRED.DOC
16:2. EDIT menus
Items are selected from menus by using the up and down
cursor keys to move to an item and then pressing the
ENTER key to select the item. Alternatively a letter may
be pressed and the next item beginning with that letter
will be moved to (but not selected until the ENTER key is
pressed). This is especially handy to move to a filename,
for example to select a file beginning with "Z" one could
begin by pressing the Z key rather than moving all the
way down the list one file at a time using the DOWN ARROW
key. It is useful also for selecting items from the main
menu, for example to quit the program you can just press
Q and then ENTER. Help on each menu item is provided by
moving to that item and pressing the F1 key. The menu can
be cancelled by pressing the ESCAPE key.
16:3. Editing keys
The special keys used for editing text are displayed by
pressing F1 while editing. The keys used to move around
and edit a line are the same as those used when inputting
commands into EASISTAT, and additionally the UP and DOWN
cursor keys and PAGE UP and PAGE DOWN keys can be used to
move around the text. CONTROL-PAGE UP and CONTROL-PAGE
DOWN move to the start and end of the text. A block of
text can be marked using the F6 key, and before another
block can be marked the F5 key must be used to unmark the
first block. Once a block of text has been marked it can
be moved, copied or deleted by pressing the F2, F3 or F4
keys. Previously deleted blocks can be undeleted by
pressing CONTROL-F4, and if desired this process can be
repeated a number of times. Pressing the ESCAPE key
causes the main menu to appear.
16:4. Using buffers
An indefinite number of files may be edited at the same
time with EDIT. Each file is read into its own area of
memory referred to as a buffer. Only one buffer is
displayed at a time, and to edit other buffers the
119
The EDIT program
options "+ next buffer" or "- last buffer" can be
selected from the main menu. The name of the last file
loaded from or saved to is written at the bottom of the
screen for each buffer. If EDIT is initially provided
with multiple filenames when it is first run then all
these files will be loaded into different buffers. To
load in a file into a new buffer while EDIT is running,
it is necessary to first select the "New buffer" option
from the menu and then to load a file into that.
Alternatively buffers which are no longer required can be
deleted with the "Delete buffer" option (which acts on
the currently displayed buffer). Any changes made to the
text in that buffer should be saved first if desired.
When there is only one buffer it cannot be deleted.
Text can be transferred between buffers by deleting it in
one buffer by marking a block and then pressing F4, then
changing to another buffer and undeleting it with the
CONTROL-F4 key. To copy a block of text to another
buffer, first mark it with F6, then copy it with F3, then
delete the still-highlighted block with F4 and finally
change to another buffer and undelete it with CONTROL-F4.
16:5. Working with files
When the "Load file" option is selected then a file
specification will be requested. This may either be the
name of the file to load or else a specification which
can contain the DOS wildcard characters * and ?. Refer to
your DOS manual for the meanings of these. All files
matching the specification will be displayed (if the
filename itself has been entered then only one file will
match). The desired file can then be selected from the
list by moving to it and pressing ENTER.
When saving a file or reading or writing a highlighted
block the exact filename must be specified. Saving or
writing a file will overwrite any file of the same name
which might already exist on disk. Loading a file will
replace the contents of the current buffer, so make sure
these are saved first if desired. When saving a file the
default name provided will be that of the last file
loaded from or saved to, but this name can be altered to
something else before the file is saved.
120