Range specifications select the exact lines of text on which the line editing command will operate. There are several general classes of range specifications: 1. Single line ranges specify a single line of text. 2. Multiple line ranges specify blocks of text, such as an entire buffer or all lines from the current line to the end of the buffer. 3. Compound ranges combine single line ranges with operators to specify multiple lines of text. 4. Noncontiguous ranges specify multiple lines that are not necessarily adjacent to one another.
1 – ALL
The ALL range further refines a general range specification. Format: [range] ALL 'string' While range can be a single, multiple, or compound range, the command being performed will only apply to those lines of text containing the given string. This string can be enclosed in single or double quotation marks. Ex: TYPE ALL 'EDT' When ALL is used, the default for range is WHOLE. This command will type all the lines in the current buffer containing the string 'EDT'. SUBS/A/B/50:100 ALL '1' Substitute B for A in all lines from 50 to 100 which include the string 1.
2 – AND
The AND range selects a group of single lines. Format: range-1 AND range-2 AND range3 ... Or: range-1 , range-2 , range3 ... Each of the ranges must be a single line range. Each of the single lines is operated on. Ex: TYPE 4 AND 7 Lines 4 and 7 are displayed on the terminal TYPE BEGIN,END-1 The first and last lines are displayed on the terminal
3 – BEGIN
The BEGIN range (abbreviated B) is a single line range that specifies the first line in the buffer.
4 – BEFORE
The BEFORE range (abbreviated BEF) is a multiple line range that specifies all the lines in the buffer preceding the current line.
5 – BUFFER
The BUFFER (abbreviated BU) specification may precede any other range specification and indicates that the range is to be applied to a named buffer. Format: BUFFER name [range] Or: =name [range] The two forms are equivalent. Name is the name of the buffer in which the text resides. If you leave out the range, the entire buffer is selected.
6 – DOT
The dot (.) is a single line range that refers to the current line of text. For many commands, dot is the default range. See the help text for a command if you are unsure of the default. Ex: TYPE . Display the current line.
7 – END
The END (abbreviated E) range specifies an imaginary line following the last line in the buffer. END does not specify the last line in the buffer. The last line can be referred to by E-1 (that is, the line preceding END). When the END line is typed, it looks like: [EOB]
8 – FOR
The FOR range is a multiple line range that selects a specified number of lines starting at a specified location. Format: [range] FOR n Or: [range] # n The two forms are equivalent. Range is a single line range that specifies the starting position, and n is an integer number. If range is omitted, the current line is the starting position. Ex: TYPE . FOR 5 Display 5 lines, starting with the current line TYPE #5 Equivalent to the previous example TYPE BEGIN FOR 10 Display the first 10 lines in the buffer
9 – LAST
The LAST (abbreviated L) range is a single line range that refers to the line in the previous buffer which was the current line when you switched to the current buffer.
10 – MINUS
The minus sign (-) in ranges selects a single line that is a specified number of lines before a specified line. Format: [range] - [n] Range is a single line range, and n is an integer. The line selected is the line that is n lines before the line specified by range. If you omit range, the current line is used; if you omit n, 1 is used. Ex: TYPE 15 - 3 Display the third line before the line numbered 15. TYPE END -1 Display the last line in the buffer. TYPE - Display the previous line.
11 – NUMBER
A line number is a single line range that refers to the line having the specified number. The line number may contain a decimal point. Ex: TYPE 10 Display line number 10. INSERT 65.3 Insert above line 65.3. The maximum allowable line number is 2814749767. A line number may have up to five digits to the right of the decimal point. You can change the line number with the RESEQUENCE command. In addition, the INSERT and INCLUDE commands will automatically change the numbers of existing lines if necessary to make each line in a buffer to have a line number larger than the previous line. When lines are read from the primary input file and that file has sequence numbers, the line number assigned is the sequence number from the file, plus N*100000, where N is large enough to ensure that each line in the buffer has a line number larger than the previous line. File sequence numbers range in value from 0 to 65535.
12 – ORIGINAL
Format: ORIGINAL n The ORIGINAL (abbreviated O) range is no longer a feature of EDT. The keyword ORIGINAL is ignored; the number specified is taken as an editing line number. See HELP RANGE NUMBER for more information.
13 – PLUS
The plus sign selects, in ranges, a single line that is a specified number of lines after a specified line. Format: [range] + [n] Range is a single line range, and n is an integer. The line selected is the line that is n lines after the line specified by range. If you omit range, the current line is used. If you omit n, 1 is used. Ex: TYPE 15 + 3 Display the third line after the line numbered 15. TYPE BEGIN +1 Display the second line in the buffer. TYPE + Display the line following the current line. TYPE 'string'+2 Display the second line following the next line continaing 'string'.
14 – REST
The REST (abbreviated R) range is a multiple line range that refers to the current line and all lines following in the buffer.
15 – SELECT
The SELECT range is a multiple line range that contains all lines between the current line and the SELECT mark. The SELECT mark is set by the change mode SEL nokeypad command or the keypad SELECT function.
16 – STRING
A quoted string specifies a single line that contains the specified string. You can enclose the string in either single or double quotation marks (' or "). When you use a string as a range, EDT will search forward, starting with the current line, until it locates a line with the specified string. If a minus sign (-) precedes the string, the search will be backward. Ex: TYPE 'abc' Locate and display the first line forward that contains the string 'abc'. TYPE -"abc" Same, except the search will be backward.
17 – THRU
The THRU range is a compound range that specifies all lines between two single line ranges. Format: range-1 THRU range-2 Or: range-1 : range-2 Both forms are equivalent. Starting with range-1, EDT selects all the lines up to and including the line specified by range-2. Ex: TYPE 15:30 Display all lines with numbers between 15 and 30. TYPE 'glorp':END Display all lines from the first line forward containing 'glorp' to the end.
18 – WHOLE
The WHOLE (abbreviated W) range refers to the entire text buffer.