HTBasic Help
×
Menu
Index

MOVELINES

Moves program lines from one location to another.
 
 MOVELINES start [,end] TO target
 
Usage:
MOVELINES 600 TO 1500
MOVELINES 500,1200 TO 4100
MOVELINES First,Second TO Target
 
Description:
Note: MOVELINES is supported for HP BASIC compatibility as HP Workstations did not have full-screen editors which made this type of editing command necessary. But it is now much easier to use cut and paste with HTBasic's full-screen editor.
 
MOVELINES moves a block of lines to a new location. This differs from the COPYLINES statement in that COPYLINES makes a copy of the original program portion. If no ending line is specified, only one line is moved. The target line cannot be in the range specified by start and end. If start doesn't exist, the line immediately after that line number is used. If end doesn't exist, the line immediately before that line number is used. If a non-existent line label is specified, an error will be reported. If the arguments specify a destination line number or program section that already exists, the old section will be renumbered to make room for the new program lines.
 
Line numbers and labels are renumbered and updated if needed. MOVELINES may not move lines containing a SUB program or DEF FN definition unless the new line number is greater than any existing line number; otherwise an error is issued because SUB or DEF FN must follow all previous lines. If an error occurs during a MOVELINES, the copy is terminated and the program is left partially changed. This command can only be executed from the keyboard. It cannot be included in a program.
 
See Also: