O / OO - Overlay Lines

Syntax


O[n]

OO / OO



Operands


n

The number of lines to be overlaid. If you do not type a number, or if the number you type is 1, only one line is overlaid.


Description

The O (overlay) line command specifies the destination of data that is to be copied or moved by the C (copy) or M (move) line commands. The data that is copied or moved overlays blanks in an existing line of data. This allows you to rearrange a single-column list of items into multiple column, or tabular, format.  


To overlay one or more lines:


    1. Type either M or C in the line command area of the line that is to be moved or copied.
    2. Type O in the line command area of the line that the moved or copied line is to overlay. You can type a number after the O line command to specify the number of times that the M or C line command is to be performed.
    3. Press Enter.
    4. The data being moved or copied overlays the specified line or lines.


To overlay a block of lines:


    1. Type either MM or CC in the line command area of the first and last lines of a block of lines that is to be moved or copied. You can scroll (or use FIND or LOCATE) between typing the first command and the second command, if necessary.
    2. Type OO in the line command area of the first and last lines that the block of lines being moved or copied is to overlay. Again, you can scroll (or use FIND or LOCATE) between typing the first OO and the second OO, if necessary.
    3. Press Enter.
    4. The lines that contain the two CC or MM commands and all of the lines between them overlay the lines that contain the two OO commands and all of the lines between them.


Only blank characters in the lines specified with O or OO are overlaid with corresponding characters from the source lines. Characters that are not blank are not overlaid. The overlap affects only those characters within the current column boundaries.


The number of source and receiving lines need not be the same. If there are more receiving lines, the source lines are repeated until the receiving lines are gone. If there are more source lines than receiving lines, the extra source lines are ignored. The overlay operation involves only data lines. Special lines such as TABS, BNDS, and COLS are ignored as either source or receiving lines.


Following the operation, if the source lines were selected with M/MM line commands, then the source lines will be deleted if, and only if, all characters in the source lines were overlaid into blanks in the receiving lines, or the characters in the receiving lines were identical. 


Application Note: Using Excluded Lines for Overlay Operations


When you are overlaying one block of lines with another block of lines, and the content of these lines is indented or of variable length, it can sometimes be difficult to decide exactly which lines the line commands should be placed on.  A convenient way to 'line up' the lines you want to use is to temporarily exclude the data lines, or some nearby lines, in order to make more obvious which data lines are the ones you want.


Using Excluded Lines as Guides


You can use an excluded line as a "marker" to identify the beginning or ending of a region of lines you want to move, copy or overlay.  By putting an X line command where the ends of the region of lines are, you can see if you placed it correctly by visually inspecting the data lines that are next to the dashed line of the excluded-line placeholder.  If it appears you misplaced this line, just use an S command to unexclude it, and try again.  Once you have your area defined as you like, use the MM, CC, OO or ORR command as needed.  Example:



Notice how the excluded line placeholders act as visual guides, helping you to see exactly which lines are needed for the Overlay operation.  Here, we want to use lines 4-6 and 10-12.



Now, it is very obvious where to place the OO and MM line commands:



The Overlay operation is complete:



Finally, RESET the display so the rest of the file becomes visible again.




Using Excluded Line as the Source and/or Target of an Overlay Operation


When you have a large number of lines involved in an Overlay operation, it may be convenient to exclude the two blocks of data lines involved, so that you can confirm you have the correct number of lines in each part.  Normally, overlays involving large blocks of lines are done with an equal number of lines in both the source block and the target block.  Making the lines excluded is one way you can confirm the line counts.  Once that is done, you can directly overly the block of lines by using non-block line commands C, M, O and OR.  That is because the excluded-line placeholder represents every line in that excluded range.  Example:



There are now two excluded ranges of lines.  Because each range shows < 000003 > we are certain they are the same size.  We now overlay the second range (lines 10-12) on to the first range (lines 4-6). 


Because an excluded-line range is treated as a single entity, you do not use block commands OO or MM, but rather use line command O and M to move the entire source range (10-12) on top of the entire target range (4-6):



Because both the source range and the target range were excluded, the target range remains excluded after the Overlay operation is completed:



Finally, after unexcluding the 3 remaining excluded lines with a RESET command, the complete file is now visible.


The same result would have occurred if you had put an S line command (Show) on the excluded line placeholder that appears after line 3.



Created with the Personal Edition of HelpNDoc: Produce online help for Qt applications