09.12.2012 Views

Preface - Adobe

Preface - Adobe

Preface - Adobe

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

CHAPTER 3<br />

Numbers<br />

Numbers in the PostScript language include:<br />

• Signed integers, such as<br />

123 −98 43445 0 +17<br />

• Real numbers, such as<br />

−.002 34.5 −3.62 123.6e10 1.0E−5 1E6 −1. 0.0<br />

• Radix numbers, such as<br />

8#1777 16#FFFE 2#1000<br />

28<br />

Language<br />

An integer consists of an optional sign followed by one or more decimal digits.<br />

The number is interpreted as a signed decimal integer and is converted to an integer<br />

object. If it exceeds the implementation limit for integers, it is converted to a<br />

real object. (See Appendix B for implementation limits.)<br />

A real number consists of an optional sign and one or more decimal digits, with<br />

an embedded period (decimal point), a trailing exponent, or both. The exponent,<br />

if present, consists of the letter E or e followed by an optional sign and one or<br />

more decimal digits. The number is interpreted as a real number and is converted<br />

to a real (floating-point) object. If it exceeds the implementation limit for real<br />

numbers, a limitcheck error occurs.<br />

A radix number takes the form base#number, where base is a decimal integer in<br />

the range 2 through 36. number is interpreted in this base; it must consist of digits<br />

ranging from 0 to base − 1. Digits greater than 9 are represented by the letters A<br />

through Z (or a through z). The number is treated as an unsigned integer and is<br />

converted to an integer object having the same twos-complement binary representation.<br />

This notation is intended for specifying integers in a nondecimal radix,<br />

such as binary, octal, or hexadecimal. If the number exceeds the implementation<br />

limit for integers, a limitcheck error occurs.

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

Saved successfully!

Ooh no, something went wrong!