Was this helpful?
Character String Format T
The T format is nearly identical to the C format, except that the T format translates characters outside the normal character set into visible representations. For more information, see Character String Format C.
This format is useful when you want to produce output that looks exactly like that of a terminal monitor, which expands unprintable characters into visible representations.
The syntax of a T format specification is:
[-|*|+] tn[.w]
The value for n is the width of the field that the expanded output occupies on the page. It does not refer to the number of characters of data that are translated.
Assume the data you wish to print is the character string “John?Smith,\Esq.”, where the question mark (?) actually stands for a non-printing formfeed character. You might enter a print statement such as:
.print 'Output:', user_data(t0), ':Output'
.newline
The preceding statement would produce the following output:
Output:John\fSmith,\\Esq.:Output
The character representation of each unprintable character translated by the T format is as follows:
Newline becomes \n.
Horizontal Tab becomes \t.
Backspace becomes \b.
Carriage Return becomes \r.
Form Feed becomes \f.
Backslash becomes \\.
Null becomes \0.
Any other unprintable character is printed as the character string \nnn, where nnn is the three-digit octal number equivalent to the character.
Last modified date: 04/03/2024