Merge: Difference between revisions

From BR Wiki
Jump to navigation Jump to search
(Imported and edited the MERGE command page from old wiki)
 
(edit wording)
Line 1: Line 1:
The '''Merge (ME)''' [[command]] takes lines of code from another [[program]] (.BR file) and adds them to the program currently in memory.
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.
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====
==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, the lines will retain their original numbers (and will replace any lines in the current program that use those numbers):
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
  MERGE MERGETST -100 -300
Line 12: Line 12:
  MERGE MERGETST ADD
  MERGE MERGETST ADD


[[Image:HELP0047.jpg]]
[[Image:Merge.png]]


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


====Parameters====
==Parameters==
The syntax for MERGE is similar to the syntax for [[RENUM]].
The syntax for MERGE is similar to the syntax for [[RENUM]].


"File-ref" is the name of the file to be merged.
'''Program name''' is the name of the program to be merged.


"Starting line-num" is the first line number in the specified program which is to be included in the merge. It must be preceded by a dash (-).
"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 (-).


"Ending line-num" 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 (-).
'''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-num" 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.
'''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.
'''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====
==Technical Considerations==
See the [[LIST]] command for information about displaying lines of another program on the screen without merging them into the current program.
See the [[LIST]] command for information about displaying lines of another program on the screen without merging them into the current program.



Revision as of 12:02, 20 December 2011

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

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.