Many FRED commands use special characters to show the beginning and end of pieces of information. For example,
uses the / to mark the pattern and replacement string. Similarly, the \F character is used to mark the end of text for an A, C, or I command. Such characters are called delimiters.
Some commands will take any non-alphanumeric character as a delimiter. For example, in the S command, you can use any non-alphanumeric character to separate the pattern and the replacement string. Thus you can say such things as
s/ABC/XYZ/ s;ABC;XYZ; s.ABC.XYZ.
and so on. These are all exactly equivalent. Essentially, FRED looks at the first non-alphanumeric character after the S and takes that to be the delimiter.
Some commands will only accept specific characters as delimiters. For example, the A command only accepts \F as the end-of-text indicator.
The delimiters of a command must occur at the same input "level" as the command itself. In other words, if a command is issued in one buffer, it cannot obtain delimiters from text in other buffers. For example, consider the command
a \B(buff) \F
This appends the contents of buffer (buff) to the current buffer. Even if (buff) contains a \F character, that \F will not terminate the appending operation. The terminating \F must be at the same level as the A that started the appending operation. The \F in (buff) will be appended to the current buffer as a normal character; in other words, its special meaning will be ignored, as if the character were preceded with a \C. The same principle holds for C and I commands.
The delimiters must also be on the same level for commands like S, T, ZL, ZU, and ZT. For example, consider the command
Even if buffer (xyz) contains a / character, the / will not be regarded as the end of the replacement string. The closing / must be at the same level as the S command that it closes. The same principle holds for the forms of JM, JP, and JE that take delimiters around their messages.
Parentheses act as delimiters in commands like B, M, K, ZM, and ZK. Once more, the parentheses must occur at the same input level. For example,
will result in an error (? buff/reg name invalid) even if buffer (8) contains the text "xyz)".
The new-line character at the end of a line acts as a delimiter for some commands, e.g. G and U. As with other delimiters, the new-line must be at the same input level as the command it delimits. For example, in the command
new-line characters in buffer (x) will not be regarded as delimiters of the G command.
Copyright © 1998, Thinkage Ltd.