{\huge Editing}

Editing in Forth comprises editing the forth screen file to
contain forth definitions that can be loaded. This is best done inside
the Forth environment where definitions can be loaded, executed and
edited interactively. It is recommended that the screen file provided
is copied prior to edits being made.

To edit the disk screen file inside Forth there is a simple screen editor
provided on disk screen 12. This makes reference to the host specific
routines described on screens 7 to 11. Type: \\
{\tt 12 LOAD} \\
to load the editor into the dictionary, followed by:
{\tt n ED} \\
in order to edit screen n. The cursor keys, line left (F7), line right (F8),
page up (ALT F9), page down (ALT F10), delete to eol (CTRL BACKSPACE), are
all active. The exit key (CTRL End) like the others have been chosen
according to the {\tt ITERM} file of the IMS D705B toolset. Either the editor
source or the {\tt ITERM} file may be edited to change key assignments.

If editing is a major concern, or you have broken the {\tt ED} command
definition on disk, then the screen file can be edited on the host. A
utility called {\tt transform} is provided that will convert screen files
into text files and back again. Once the forth screen binary is converted
into text an editor of your choice can be used. The commands are:
{\tt transform forth.scr} \\
to manufacture a text file called "forth.txt". When finished editing:
{\tt transform forth.txt} \\
will rebuild a screen file "forth.scr" from the text file. Be careful
to make regular copies of screen files before transforming.

To edit a file of your own apart from the provided "forth.scr", copy
"forth.scr" to another name, eg "new.scr",
and use the {\tt USING} word in Forth to
change to that file by typing:
{\tt USING new.scr }  \\
Refer to the glossary for more information on files. See {\tt LOAD},
{\tt LIST}, {\tt USING}, and {\tt BLOCK}.
