EDIT (full screen)
Full Screen Program Editor
This directive invokes the Thoroughbred Basic program editor, which provides line editing with a full-screen display on which you can create and maintain Thoroughbred Basic programs.
Syntax
Section titled “Syntax”EDITRemarks
Section titled “Remarks”This directive can only be used in Thoroughbred Basic Console Mode.
This directive performs a CALL to the public program “*EDIT*”.
In release levels starting with 8.1, EDIT automatically uses the terminal configuration from TCONFIG8 (for non-windowed terminals) or TCONFIGW (for windowed terminals).
If a program is not currently in memory, the program editor displays a blank screen and the programmer can enter a new program.
If a program is currently loaded into memory and has not been protected by ENCRYPT or PSAVE, the program editor displays the program for the programmer to edit.
The editor has two Basic functions: Edit Mode and Line Mode. Pressing the Enter key switches the programmer between Edit Mode and Line Mode. When the editor is called for the first time, the programmer is in Line Mode. In this mode, the cursor (arrow) keys move the cursor up or down one program line at a time. When the cursor is on a program line, press the Enter key to switch to Edit Mode. The cursor keys only scroll inside the program line rather than the entire program. When the editing of the program line is complete and the program line has no syntax errors press the Enter key to save the changes and return to Line Mode.
After the programmer exits the program editor by pressing the F4 key the system returns to Thoroughbred Basic Console Mode. The program can then be SAVEd.
The programmer can change the name of the program editor that Thoroughbred Basic automatically calls by altering the following line contained in the IPLINPUT file:
PRM EDIT=program-nameprogram-name- is the new name of the program editor.
The program editor uses a wide variety of functions to edit Thoroughbred Basic programs. The following is a list of editing and function keys:
| Editing Keys: | ||||
|---|---|---|---|---|
| Cursor keys | Line insert | Tab | ||
| Character insert | Line delete | Back-tab | ||
| Character delete | Line | erase | Home |
- Cursor keys (up, down, left & right)
-
Edit Mode: The Up/Down cursor keys move the cursor up or down one line of the program line at a time. The Left/Right cursor keys scroll the cursor only on the program line that is being edited.
Line Mode: The Up/Down cursor keys move the cursor up or down one program line at a time. The Left/Right cursor keys are ignored.
- Character insert
-
Edit Mode: Inserts characters in the program line that is being edited.
Line Mode: This key is ignored.
- Character delete
-
Edit Mode: Deletes the character that the cursor is currently on.
Line Mode: This key is ignored.
- Line insert
-
Edit Mode: This key is ignored.
Line Mode: Inserts a line between program lines, which enables you to enter new program lines. If blank lines are inserted and not used, they are removed when the screen is reprinted or scrolled.
- Line delete
-
Edit Mode: This key is ignored.
Line Mode: Deletes the program line that the cursor is currently positioned on.
- Tab
-
Edit Mode: This key lets the programmer move the cursor forward five characters at a time.
Line Mode: This key is ignored.
- Back-tab
-
Edit Mode: This key lets the programmer move the cursor backward five characters at a time.
Line Mode: This key is ignored.
| Function Keys: | |
|---|---|
| F1 - Page Down | F6 - Help |
| F2 - DELETE STATEMENT | F7 - PRINT STATEMENT |
| F3 - Page Up | F8 - Search/Replace |
| F4 - END | F9 - Reprint screen |
| F5 - Undo statement | F10 - GOTO statement |
- F1 - Page Down
-
Edit Mode: This function is ignored.
Line Mode: The programmer can scroll forward one screen at a time. The Page Down key, if available, performs the same function.
- F2 - DELETE STATEMENT
-
Edit Mode: This function is ignored.
Line Mode: Deletes a program line or a range of program lines. When you press the F2 key the following prompt is displayed:
DELETE STATEMENTS: From <return=current>:______To <return=current> :______If one program line is to be deleted and the cursor is currently positioned on that program line, the programmer can press the Enter key and that program line number or label prints automatically in the input field. Or, the programmer may enter starting and ending program line number or labels to be deleted.
- F3 - Page Up
-
Edit Mode: This function is ignored.
Line Mode: The programmer can scroll backward one screen at a time. The Page Up key, if available, performs the same function.
- F4 - END
-
Edit Mode: This key exits the program editor and returns the programmer to Thoroughbred Basic Console Mode or whatever mode the editor was called from.
Line Mode: This key exits the program editor and returns the programmer to Thoroughbred Basic Console Mode or whatever mode the editor was called from.
- F5 - Undo statement
-
Edit Mode: When a program line is edited, the original is stored temporarily. If, while editing the program line, the programmer makes a mistake and wants to start again with the original program line, pressing the F5 key reprints the original program line in the window. When entry mode is terminated, the temporary storage area is cleared.
Line Mode: This function is ignored.
- F6 - Help
-
Edit Mode: This function is ignored.
Line Mode: Lists the Editing Keys and Function Keys.
- F7 - PRINT STATEMENT
-
Edit Mode: This function is ignored.
Line Mode: This function lets the programmer print a program line or a range of program lines on the printer. When the F7 key is pressed, the programmer is asked to select a printer. After a printer is selected the following prompt is displayed:
PRINT STATEMENTS: From <return=current>:_____To <return=current>:_____If only one program line is to be printed and the cursor is currently positioned on that program line, the programmer can press the Enter key to print. Otherwise, the programmer may enter starting or ending program line number or labels to be printed.
- F8 - Search/Replace
-
Edit Mode: This function is ignored.
Line Mode: Lets the programmer search the program for the occurrence of a specific program line number or label or text segment. This function can either search a range of program lines or search to the end of the program. There is also the option of replacing the text found with another text sequence. The programmer may specify only one search and one replace string, each being up to 40 characters long.
- F9 - Reprint screen
-
Edit Mode: This function is ignored.
Line Mode: Reprints the entire editor screen. Under certain circumstances, it may be desirable to reprint the screen due to editing conditions.
- F10 - GOTO statement
-
Edit Mode: This function is ignored.
Line Mode: Moves to the specified point in the program, either a program line number or label or text segment. When searching for text, the programmer may start from the present position (find next occurrence) or the beginning of the program (find first occurrence):
GOTO-Enter statement # or text segment (“):________________
Options for GOTO statements:
0- GOTO first line in program
7900- GOTO program line 7900, or next program line if 7900 does not exist
99999- GOTO last program line in program
Options for GOTO text segments:
"A9$=- GOTO next occurrence of text "A9$=" (searches from current cursor position)
"A9$="- GOTO first occurrence of text "A9$=" (searches from the beginning of the program)
"7900- GOTO next occurrence of text "7900" (note this may be the actual program line number or label or a command reference to this program line)
See also
Section titled “See also”EDIT line, EDIT recall, and EDITF directives
Description of EDIT in the Thoroughbred Basic Utilities Manual
From the Thoroughbred Basic Language Reference, Volume I: A–E, version 8.9.1. Open this page in the PDF