C H A P T E R 2
LaserWriter Select 310 Software
End-of-Line Recognition
In PostScript interpreter versions 40.0 and later, the scanner and the readline operator recognize all three external forms of end of line (LF alone, CR alone, and CR LF pair) and treat them uniformly. The PostScript interpreter does not translate data read or written by any other means.
In the LaserWriter Select 310 printer,
The LaserWriter 310 Select printer supports translation by the communication channel to maintain compatibility with diverse host operating systems and communications environments. For instance, always sending CR LF for EOL permits use with operating systems that treat CR alone or LF alone as EOL characters, provided they strip out the redundant character. In addition, the CR LF convention is essential for use with directly connected terminals.
The new rules for
1.Any of the three forms of EOL appearing in a string are treated as a single newline (LF) character. For example:
(any text<CR>some more text) (any text<LF>some more text) (any text<CR><LF>some more text)
The above examples produce identical string objects, each of which has a single newline (LF) character separating text and some.
2.Any three forms of EOL appearing immediate after \ in a string are treated as a continuation. This means that both the \ and the EOL are discarded:
(any text\<CR>some more text) (any text\<LF>some more text) (any text\<CR><LF>some more text)
The above examples produce identical string objects.
3.Any of the three forms of EOL appearing outside a string are treated as a single white- space character. Since the language treats multiple
currentfile read<cr>x currentfile read<LF>x currentfile read<CR><LF>x
The above examples produce identical results. The read operator reads the character x from the current input files and leaves its character code (an integer) on the stack.
4.The readline operator treats any of the three forms of EOL as the termination condition.
PostScript Language Changes | 43 |