Many of the primary commands support line range operands to specify the specific lines which the command is to work on. Rather than repeat these details in each command syntax diagram, whenever the parameter line-range-operand appears, the following operands can be substituted.


Syntax



[

  { .start-label  | .start-line-number } 

 

  [ {.end-label   | .end-line-number } ]

]


[

  :tag 

]


Alternative Line Command Specification - CC and MM Blocks


In addition to the line number ranges being specified on the command line, all Primary commands which accept line-range-operand format will also accept the line range via line commands. The C/CC and M/MM line commands can be used to mark the lines to be used and then the primary command entered without a line range specification.

Single character text selection operands


An optional shortcut method is available for entering the line range operands if suitable. When a text area is selected via a mouse-drag operation of via keyboard Shift-arrow keys, the line and column range of the selected text is remembered for future re-use. If you enter the single character # in the command line, it will be substituted with the start/end line numbers of the select block. e.g  # could end up as .20 .30 if that were the previous selected line range.



Operands


start-line-number

This should specify the starting line number of a range. This will be either a simple numeric value, or, for those primary commands like FIND and CHANGE that also support column range operands, the value should be a dotted numeric to distinguish it from the column operand(s). e.g. .123 would describe line 000123.


start-label

This should be a valid label of an existing line to use as the start of range. e.g. .from.


end-line-number

This should specify the ending line number of a range. This will be either a simple numeric value, or, for those primary commands like FIND and CHANGE that also support column range operands, the value should be a dotted numeric to distinguish it from the column operand(s). e.g. .456 would describe line 000456.


end-label

This should be a valid label of an existing line to use as end of range. e.g. .to.


NOTE: If no end-line-number or end-label are provided, the starting line number is treated as a one line range.


:tag

This should be a valid tagname in the file. The 'range' of lines processed will be ALL lines which are currently tagged with the specified tagname. e.g. :XXX would refer to all lines which are marked with the :XXX tagname.



Description


The following examples should make this much clearer. They are shown using a FIND command, but line range processing applies to many of the Primary commands:


FIND "ABC" 1 10 .AAA .BBB


Find string "ABC" in columns 1 to 10 on lines from the line labeled .AAA to the line labeled .BBB.


FIND "DEF" 3 30 .110 .120


Find string "DEF" in columns 3 to 30 on lines 110 thru 120.


FIND "GHI" 3 30 .110 .120 :T


Find string "GHI" in columns 3 to 30 on lines tagged with :T, in lines 110 thru 120.


FIND "PQR" :XTAG


Find string "PQR" anywhere on any line currently tagged with the tag-name :XTAG.


Additional Criteria


Many of the primary commands provide additional selection abilities (like the X|NX and U|NU keyword operands) which work in conjunction with the normal action of the line range operands described above. Check the detailed description of the individual primary command.

Created with the Personal Edition of HelpNDoc: Create Professional CHM Help Files with HelpNDoc's Easy-to-Use Tool