7.0

Table Of Contents
object that spans the entire area in which the data selection can appear, and set a line condition to test for
the presence of the string “PREF.” The data selection applies only to those lines in the data selection region
that contain the string “PREF.”
Related topics:
Line Conditions (Page 277)
Conditions (Page 276)
Global Conditions (Page 276)
Local Conditions (Page 277)
Data Selection Objects (Page 104)
18.1.5 Variables
What is a variable ?
Variables are part of PlanetPress Talk, and are described in the PlanetPress Talk Language Reference.
A variable is a value that changes over time, that has a name, a specific type, and a defined scope. The name
makes it possible to reference the variable. All variable names in PlanetPress Talk begin with an ampersand,
for example, &printermode.
The type of a variable defines what kind of data it contains and consequently what kinds of operations you can
perform on it.
The scope of a variable is the context in which it is available. A variable may be available only to a specific
object (a local variable), or available wherever you can enter a PlanetPress Talk expression (a system variable
or a global variable). You can enter a PlanetPress Talk expression in the PlanetPress Talk properties of any
object or page, the PlanetPress Talk properties of the Document properties dialog box, or in any text box that
accepts PlanetPress Talk code (by default these text boxes have a maroon label).
You can define, set and delete both local and global variables in PlanetPress Design. You cannot define or
delete system variables, and, with a few exceptions, neither can you set system variables. Consult the
PlanetPress Talk Language Reference for more precise definitions of system, global, and local variables.
Common Uses of Variables
The following are several common uses for variables:
Store values that you want to reference at various places in the document.
Concatenate strings For example, you want to create a footer for each page of a patient record
document that contains the patient’s name, physician’s name, file number, and date the record was last
updated. All the pieces of information are available in the input data.
Perform calculations For example, the input data for your financial statement document does not
include a figure for year-to-date earnings, but does include earnings per month.
Create counters For example, the input data for your invoice document contains a variable number of
line items for each invoice.
System Variable Example
The system variable &current.datapage contains the page number of the data page the document is currently
processing. The type of this variable is integer; it always contains an integer value. It is a system variable and
thus is automatically initialized and set in PlanetPress Design, and available anywhere you can enter a
PlanetPress Talk expression. Consult the PlanetPress Talk Language Reference for more information on
this and other system variables in the &current system object.
Conditions - Key Concepts
Objectif Lune Inc. © 2009 278