Linenum

Qedit 5.7 for HP-UX

Home Previous Next


Linenum

Each line in the workfile has a linenum (e.g., 999.99) that determines its relative location in the workfile. Because each line number has a fractional part, lines can be added between existing lines. For example:

/add 1.1
1.1 line inserted between 1 and 2.
1.2 line inserted between 1.1 and 2.
1.3 //
/list 1/2
1 *REMARK
1.1 line inserted between 1 and 2.
1.2 line inserted between 1.1 and 2.
2 IDENTIFICATION DIVISION.

The smallest increment that you can have between two lines is 0.001. After adding enough lines in a single spot, you will not be able to add any more. For example, lines cannot be added between 5.111 and 5.112. When this happens, use Renum to renumber all or part of your file, or use Set Vis Renum On.

The simplest form of Qedit commands refers to a single linenum:

  • nnnnn.nnn: 1 1.0 1.05 .05 100 1000 10000.001
  • FIRST: the first line in the file (lowest line number)
  • LAST: the last line in the file (highest line number)
  • [ : default abbreviation for FIRST
  • ] : default abbreviation for LAST
  • : the most recently accessed line

Examples of commands that refer to a single linenum are:

/add 50.1 {add new lines at line 50.1}

/c "X"Y" 100 {change X to Y in line 100}

/delete last {delete the last line in the file}

/list [ {list the first line in the file}

/modify * {modify the "current" line}

/replace ]-1 {replace penultimate line in file}

/list 200.1 {list line 200.1, if it exists}

Qedit also supports relative line numbers, as in List LAST-5 or Modify *-5/*+5.


Home Previous Next