LABEL - Manipulate Line Labels
Syntax
The LABEL command comes in four basic syntax forms |
|
The Delete Form LABEL |
Delete a label from a line .Label or .LineNum |
The Search Form LABEL |
Add a label to a 'searched for' line .Label search-string [ +|-nnn ] Note: No space between +|- and nnn [ start-column [ end-column ] ] [ FIRST | LAST | NEXT | PREV ] [ PREFIX | SUFFIX | WORD | CHAR ] [ C ] [ Q ] [ T ] [ line-control-range ] [ color-selection-criteria ] |
The Re-Assign Form LABEL |
Assign / Reassign a Label .Label 'Current-Label [ +|-nnn ] Note: No space between +|- and nnn |
The Search Tag Form LABEL |
Add a label to a 'searched for' line with a :Tag assigned .Label :TagName [ NEXT | PREV | FIRST | LAST ] [ line-control-range ] [ +|-nnn ] Note: No space between +|- and nnn |
Operands
.Label |
The line label to be manipulated: The Delete Form: The label to be deleted. The Search Form: The label to be assigned. The Re-Assign Form: The label to be moved or assigned. The Search Tag Form: The label to be assigned.
In assigning a Label, if an existing label is present, it will be replaced. If the label exists on a different line, it will be removed from that other line. |
||
.Current-Label |
An existing assigned label to be used as the new asignment line. |
||
search-string |
The search string that identifies the line to be found |
||
start-column |
Left column of a range (with end-column) within which the search-string value must be found. If no end-column operand, then the search-string operand must be found starting in start-col. |
||
end-column |
Right column of a range (with start-column) within which the search-string value must be found. |
||
FIRST |
Starts at the top of the data and searches ahead to find the first occurrence of search value. |
||
LAST |
Starts at the bottom of the data and searches backward to find the last occurrence of search value. |
||
NEXT |
Starts at the first position after the current cursor location and searches ahead to find the next occurrence of search value. NEXT is the default. |
||
PREV |
Starts at the current cursor location and searches backward to find the previous occurrence of search value. |
||
|
|
||
PREFIX |
Locates search-string at the beginning of a word. |
||
WORD |
Locates search-string when it is delimited on both sides by blanks or other non-Word characters. |
||
CHAR |
Locates search-string regardless of what precedes or follows it. |
||
SUFFIX |
Locates search-string at the end of a word. |
||
line-control-range |
The range of lines which are to be processed by the command. The full syntax and allowable operands which make up a line control range are discussed in "Line Control Range Specification". |
||
color-selection-criteria |
A request for selection based on the highlight color of the search-string. The full syntax and allowable operands which make up a color-selection-criteria are discussed in "Color Selection Criteria Specification". |
||
+|-nnn |
This specifies an 'adjustment value' for the assignment forms of the command. It allows you to 'adjust' the line number found by the search routine either forward (+) of backward(-) from the located line number. Note1: The adjustment will NOT adjust past the 1st or last line, nor will an attempt be treated as an error. Note2: There must be no space between the |
Abbreviations and Aliases
LABEL can also be spelled as LBL or LAB
PREFIX can also be spelled as PRE or PFX
SUFFIX can also be spelled as SUF or SFX
WORDS can also be spelled as WORD
CHARS can also be spelled as CHAR
Description
This command allows you to perform various manipulations of individual Line Labels. You can Add, Delete or re-assign labels. Here are a few commented examples.
LABEL .AA "First" 10 20 FIRST |
Assign the label .AA to the first line containing the string "First" between columns 10 and 20. |
LABEL .DEAD |
Remove the label .DEAD wherever it is located |
LAB .ZFIND |
Remove ANY label from the last line founf by a FIND command. |
LABEL .AA .AA +3 |
Re-assign the label .AA to 3 lines past its current location. |
LBL .R :BX -1 LAST .10 .200 |
Assign labe; .R to 1 line prior to the Last occurrence of the tag :BX in lines 10 thru 200. |
LAB .XX fred PREFIX BLUE .AA .BB |
Assign .XX to the next line containg the Prefix fred, in color BLUE, between lines marked by the .AA and .BB line labels. |