C - Change one or more lines of text.

Syntax:

C
C.line

Examples:

c
$c
1,4c
c Replacement text...
c.Replacement line

Description:

C changes one or more lines by deleting them and replacing them with input text. If you do not specify an address, the current line is changed. If you specify one address, that line is changed. If you specify two addresses, FRED changes all the lines between and including those addresses. The first specified line must precede the second.

There are two ways to begin you replacement text:

Usually, you must indicate the end of your replacement text by entering a \F character. However, if the O-I\F option is in effect and the replacement text immediately follows the C, you don't need \F. For example, you might say

o-i\f
c Replaced text here.

In this case, FRED assumes that the new-line at the end of the line ends the replacement text; in other words, a \F is assumed to follow the end of the line.

The C. command takes a single line of text as input. For example,

3,5c.Hello there!

changes lines 3 through 5 to Hello there!. No \F is needed.

If the O+I. option is in effect, you can end input with a line consisting only of a dot followed by carriage return. For example,

c
This changes one line.
.

changes the current line to the given text. Thus with O+I. you can end your input with either \F or with the dot.

When you end your input, FRED sets "." to the last line of input. If you didn't enter any text, FRED sets "." to the line immediately before the first line deleted.

Copyright © 1998, Thinkage Ltd.