Editors > Editor Reference > Editor Commands > TR (Truncate)

Comment on this topic

Documentation Comments

Use this form to comment on this topic. You can also provide any general observations about the Online Documentation, or request that additional information be added in a future release.

Reality V15.0 ()

TR - Truncate (Editor) (m618503+tr.htm)

To

Reality

Version

Topic

Submitted by

Company

Location

Email address

Comment

 

 

TR - Truncate

Truncates lines.

Syntax

TR{n}/string{/{p{-q}}}
or
TRm-k/string{/{p{-q}}}
or
TRm,n/string{/{p{-q}}}

Syntax Elements

n The number of lines to truncate, beginning with the current line. If n is not specified, it defaults to the current line.

m-kSpecifies line m to line k.

m,n                       Specifies n lines, starting at line m.

/ A delimiter separating the different parts of the command. It can be any nonnumeric character (except a blank or minus sign) that does not appear in string. The delimiter terminating string is necessary only if further parameters follow the string specification, or if trailing blanks are to be included as part of the string.

Note that using the colon (:) as a delimiter anchors the search to the starting column (see Column Dependent Matching).

string A character string that determines where the line is to be truncated. Each line in the specified range is scanned for this text; if a match is found, the line is truncated at the beginning of the matching text.

The caret character (^) can be used within the search string to match any single character (see Wildcard Character for more details).

p Specifies a starting column (see Column Dependent Matching).

q Specifies an ending column. If omitted, defaults to p. Ignored if less than p,

Operation

If you specify a number or range of lines, all truncated lines are listed. Note that the line pointer is positioned at the last line in the range, and therefore might not be located at the last line listed.

Example

:ED MD TEST2
Top
.P
001 ABCDEF
002 ABCDEF
003 ABCDEF
004 ABCDEF
EOI 004
.T
Top
.TR3,2/C
003 AB
004 AB
.FS
.



Current contents of item TEST2.






Truncate lines 3 and 4 beginning with the string 'C'.

 

RealityV15.0Comment on this topic