09.12.2012 Views

Preface - Adobe

Preface - Adobe

Preface - Adobe

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

CHAPTER 3<br />

30<br />

Language<br />

If the character following the \ is not in the preceding list, the scanner ignores the<br />

\. If the \ is followed immediately by a newline (CR, LF, or CR-LF pair), the scanner<br />

ignores both the initial \ and the newline; this breaks a string into multiple<br />

lines without including the newline character as part of the string, as in the following<br />

example:<br />

(These \<br />

two strings \<br />

are the same.)<br />

(These two strings are the same.)<br />

But if a newline appears without a preceding \, the result is equivalent to \n. For<br />

example:<br />

(This string has a newline at the end of it.<br />

)<br />

(So does this one.\n)<br />

For more information about end-of-line conventions, see Section 3.8, “File Input<br />

and Output.”<br />

The \ddd form may be used to include any 8-bit character constant in a string.<br />

One, two, or three octal digits may be specified, with high-order overflow ignored.<br />

This notation is preferred for specifying a character outside the recommended<br />

ASCII character set for the PostScript language, since the notation itself<br />

stays within the standard set and thereby avoids possible difficulties in transmitting<br />

or storing the text of the program. It is recommended that three octal digits<br />

always be used, with leading zeros as needed, to prevent ambiguity. The string<br />

(\0053), for example, contains two characters—an ASCII 5 (Control-E) followed<br />

by the digit 3—whereas the strings (\53) and (\053) contain one character, the<br />

ASCII character whose code is octal 53 (plus sign).<br />

Hexadecimal Strings<br />

A hexadecimal string consists of a sequence of hexadecimal digits (0–9 and either<br />

A–F or a–f) enclosed within < and >. Each pair of hexadecimal digits defines one<br />

character of the string. White-space characters are ignored. If a hexadecimal<br />

string contains characters outside the allowed character set, a syntaxerror occurs.<br />

Hexadecimal strings are useful for including arbitrary binary data as literal text.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!