6.0

Table Of Contents
10
PlanetPress Talk Basics
1
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'.
Booleans
Booleans have a value of either True or False. Every condition you define in PlanetPress Design resolves to
a Boolean value.
Color Array
A color array defines the percentages of Cyan, Magenta, Yellow and Black (CMYK) that compose a specific
color. The array consists of four integers representing, respectively, the percentages of cyan, magenta,
yellow and black that compose the color. The integers are separated by commas and enclosed in square
brackets. For example the color array [100, 100, 0, 0] represents the pure blue that corresponds to the RGB
values (0, 0, 255). It defines pure blue as 100% cyan, 100% magenta, 0% yellow, and 0% black.
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) independently. 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 languages, 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 contain
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 properly. An array in PlanetPress Design can have a
maximum of 65,535 elements.
String Length, in characters
Maximum on screen 2147483647
Maximum PostScript 65535