ZT - Translate.






It is general practice to use / as a delimiter in many commands. However, any non-alphanumeric character can also be used. The final delimiter may be omitted if O-S/ is in effect and the ZT command is immediately followed by a new-line.
are two strings of characters. str1 must be the same length as str2 and no character in str1 may occur more than once.


ZT scans one or more lines and converts each character in str1 into its corresponding character in str2. For example, the command


converts 1 into A, 2 into B, 3 into C and so on.

If you do not specify an address, ZT only translates the current line. If you specify one address, ZT translates that line. If you specify two addresses, ZT translates all the lines between and including the given lines. In this case, the first address must precede the second in the buffer.

If ZT does not convert any characters in the addressed lines, an error is issued unless the command was executed from a buffer. ZT sets the condition register FALSE if no characters are translated, and TRUE otherwise. ZT sets the count register to the number of lines translated.

ZT sets "." to the last line in which a character was converted. If no conversions were made, "." is unchanged.

Copyright © 1998, Thinkage Ltd.