HTBasic Help
×
Menu
Index

EDIT

Puts you into program EDIT mode.
 
 EDIT [target [,increment]]
 EDIT SUB subprogram-name [,increment]
 EDIT FN function-name [,increment]
 
Usage:
EDIT
EDIT 100,10
EDIT Alabel
EDIT SUB Fire62
EDIT FNPete
EDIT FNOranges
 
Description:
In the syntax above, the space between FN and the function-name is shown for readability. When you type the statement, do not include the space after FN.
The following information applies only to the HTBasic Legacy Editor. For full documentation on the new HTBasic Windows Editor, please see the Getting Started Guide.
 
The EDIT command starts the full screen program editor. It automatically generates and maintains the program line numbers. The default increment for line numbers is 10, but may be specified with the increment value.
 
If you are editing an existing program, the current edit line will be either the last line edited, the last line with an error or the line specified in the EDIT command. You may specify either a line number, line label, SUB program name, or DEF FN function name. If you are editing a new program, the first line number will be 10 unless a line number is specified.
 
EDIT mode is ended by pressing CLR SCR (HOME on a PC), PAUSE, RUN or STEP keys. It can also be terminated by entering a CAT or LIST command.
EDIT can only be executed from the keyboard. It cannot be included in a program.
 
While in EDIT mode, the arrow keys, LEFT WORD, RIGHT WORD, PREV, NEXT, BOL, EOL, BEGIN and END keys can be used to move around the program. The INS CHR key toggles the overstrike mode to insert mode and back again. This remains in effect while on the same program line and is reset to overstrike mode when a new line is displayed. The DEL CHR key deletes the character under the cursor. The DEL LEFT key deletes the character to the left of the cursor.
 
Using the Legacy Editor to insert a line between two program lines or before the first line of the program, position the cursor on the line following the place you wish to insert the new line and then press the INS LN key. If necessary, the program will be partially renumbered and a new line number will be generated for you. You may insert as many program lines as is required. To end the insert line mode press the UP, DOWN, PREV, NEXT, BEGIN, END or INS LN keys. To delete a line, position the cursor on the line you wish to delete and press the DEL LN key.
 
In the Legacy Editor, the changes to a line are not made permanent until you press ENTER. If you wish to abort the changes, press an arrow key or any other key that moves the cursor to another line.
 
Keyboard commands can still be entered in EDIT mode by first deleting the automatic line number and then entering the command. To delete the line number, backspace over it and then type over the top of it or use the BACKSPACE key to delete back over the top of it or use the END key to clear the current line.
Using keyboard commands you can move a block of text from one place in the program to another (MOVELINES) or copy a block of text from one place to another (COPYLINES). Both of these commands transparently handle any line reference renumbering.
 
FIND can be used to search for a string of characters. CHANGE can be used to find a string and replace it with another string.
 
INDENT can be used to automatically indent program constructs. REN can be used to renumber part of or the entire program. DELSUB is used when a subprogram needs to be deleted.
 
Use "HELP #" to display a list of the keyboard key mappings.
 
See Also: