7.5

Table Of Contents
Measure Limit
Smallest PostScript10
-38
-1 000 000 000 000 000 000 000 000 000 000 000 000 000
Largest PostScript 10
38
1 000 000 000 000 000 000 000 000 000 000 000 000 000
Currency
Currency is a specific type of measure intended for use with numbers that represent monetary values. The currency type has
a precision of 4 decimal places, and can take on a minimum value of -99999999999999.9999 and a maximum value of
+99999999999999.9999. The only operations you can perform on a currency type are addition, subtraction, multiplication and
division, and negation.
Strings
A string is a sequence of one or more alphanumeric characters. You often use strings to display information on a page. You
must enclose strings in single quotes, for example 'mystring'.
String Length, in characters
Maximum on screen 2147483647
Maximum PostScript65535
Booleans
Booleans have a value of either True or False. Every condition you define in PlanetPress resolves to a Boolean value.
Color Array
To define the color or shading of object displayed on screen or printed on paper, color values are used, which are typically
based on color models. Models may include a single color (such as for the grayscale model) or multiple colors. The RGB color
model uses three colors (Red, Green and Blue), while the CMYK model uses four (Cyan, Magenta, Yellow and Black). For each
color, a value ranging from 0, for 0% color intensity, to 255, for 100% color intensity, is used. If the Grayscale model is used,
only a single value is required. For the RGB model, three values are used, while four are needed for the CMYK model. These
values are stored in an array, which can store as many as four values.
Color arrays are primarily used internally by the PlanetPress Talk interpreter. However there are a handful of commands that
expect a color array as an argument (setfillcolor for example).
Arrays
An array is a table of values of the same data type. You reference each element of the array (each cell of the table) inde-
pendently. Arrays can be of type Boolean, integer, measure, currency, or string. The type of the array defines the type of
values each of its elements can contain. Thus in a Boolean array, the value of each element is either True or False, and in a
string array each element is a string value.
Arrays in PlanetPress Talk are one-dimensional. If you are not familiar with arrays from other programming or scripting lan-
guages, you can think of a one-dimensional array as a single row of a table. You specify the number of elements you want the
array to contain, and initialize each of the elements, when you define the array. Note that you cannot subsequently increase or
decrease the number of elements in an array. If you are uncertain of the exact number of elements the array may need to con-
tain at runtime, you may want to create an array that can handle the most extreme case you expect the document to
encounter at runtime. Note however that increasing the size of the array increases the memory required for the document,
and that it is good programming practice not to create arrays that are larger than what the document requires to execute prop-
erly. An array in PlanetPress can have a maximum of 65,535 elements.
You define an array using the define() command, and assign values to individual elements using the assignment operator
(:=), the set() command or the put() command. You retrieve the value of an individual element using either the get() com-
mand, or the name of the array followed by the position of that element in the array. The position is an integer value starting at
©2010 Objectif Lune Inc - 223 -