Next: CDELETE
Previous: CASE
Up: The Commands in Detail
CCOPY [(l1 [l2])] c1 [c2] COLUMN [+|-]col [LINE [+|-]num] [n]
CC
CCOPY means column copy, i.e. it copies columns of a line. It should
not be confused with the command COPY, which copies lines.
copies column 5 to column 20 of the current line,
copies the columns 5 to 10 to the columns 20 to 25. Note that you specify only
the first of the target columns, since the number of columns has been
set when specifying the source columns.
Copying works as follows: First, the columns behind the target column
are moved to the right by the needed amount of columns. Then, the source
columns are copied into the target area. This is the same method that is
used when using the command COPY, which also does not overwrite but
inserts the copied data.
Source and target area may not overlap. If they do, you receive the
message
Source and target area overlap
Instead of using absolute column specifications you can use relative
ones if you add a leading sign to the column specification:
has the same effect as the command above.
Until now, the commands were limited to the current line. As usual, you
can have the command applied to n following lines by specifying a
number as last parameter:
applies the command to 7 lines. If the workfile does not have
sufficient lines, you get the message
The methods described until now are executed from the current line on.
Alternatively, you can also specify the lines you want to be affected
enclosed in parentheses as first parameter:
ccopy (500 1200) 5 10 c20
This means, CCOPY will be applied to the lines 500 to 1200, wherever
the current line is. The line numbers specified may also be
symbolic line numbers (t, f, p, *, n, l, b, s). If you
specify only one line number, it is assumed the second line number is
equal to the first. Please mind the parentheses.
About the last parameter of CCOPY: Until now, the target columns have
been in the same line as the source columns were, but you can also
specify the target lines separately:
This copies the columns 5 to 10 of the current line to the columns 20 to
25 of line 700.
As with the COLUMN specification, you can precede the LINE
specification with a leading sign, thus making the column specification
a relative one:
If the line given cannot be found, you get the message
Of course, you can also add the (two alternative) numbers of affected
lines:
ccopy (500 b) 8 column 9 line 000400
Please keep in mind that you cannot specify a target line that does not
exist (yet). So, if you want to copy something behind the last line of
the workfile, you have to create that (empty) line first.
CCOPY allows for whole rectangles of the workfile to be copied to
another part of the workfile.
Next: CDELETE
Previous: CASE
Up: The Commands in Detail