Merge: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(edit wording)
 
Line 11: Line 11:


  MERGE MERGETST ADD
  MERGE MERGETST ADD
===Syntax===
MERGE <program name> [-<from line number>] [-<to line number>] [{<first line number>|ADD}]


[[Image:Merge.png]]
[[Image:Merge.png]]

Latest revision as of 17:13, 6 May 2014

The Merge (ME) command takes lines of code from another program (.BR file) and adds them to the program currently loaded in memory.

MERGE with a program name and a line number now causes only the specified line to be merged. Previously all lines from the line specified to the end of the program were merged. This change could affect existing applications.

Comments and Examples

The following command causes lines 100 to 300 of MERGETST.BR to be merged into the current program. Neither the ADD parameter nor a new first line number is specified, so the lines will retain their original numbers and any lines in the current program that use those numbers will be replaced by the new lines:

MERGE MERGETST -100 -300

The following command causes all lines in MERGETST.BR to be added to the end of the current program:

MERGE MERGETST ADD

Syntax

MERGE <program name> [-<from line number>] [-<to line number>] [{<first line number>|ADD}]

Defaults

  1. Merge the entire program.
  2. Merge from the starting line number to the end of the program.
  3. Retain original line numbers (caution: merged lines will replace existing lines with the same number).

Parameters

The syntax for MERGE is similar to the syntax for RENUM.

Program name is the name of the program to be merged.

"From line number" is the first line number in the specified program which is to be included in the merge. It must be preceded by a dash (-).

To line number is the last of the line numbers in the specified program which is to be included in the merge. It must be preceded by a dash (-).

First line number is a new line number that is to be assigned to the first merged line. Additional merged lines will be assigned numbers that match the increments used in the original file. Caution: if lines in the current program use the same numbers as lines which are being merged in, the original lines will be replaced.

ADD causes all lines being merged to be added to the end of the original program. The first merged line will be assigned a line number which is ten greater than the last line in the original program. Additional merged lines will match the increments used in the original file.

Technical Considerations

See the LIST command for information about displaying lines of another program on the screen without merging them into the current program.