6.0

Table Of Contents
13
elseif()
show( &image_paths[&i] )
crlf( 0.16 )
endif()
Variables
A variable is a value that changes over time, that has a specific type, and a defined scope. Variables have
names to make it possible to reference them. All variable names in PlanetPress begin with an ampersand.
For example, &printermode.
Type The type of a variable defines what kind of data it contains and consequently what kinds of operations
you can perform on it. The following are the data types available in PlanetPress Talk: integer, measure,
currency, string, boolean, array, color array, and directory. See “Data Types” on page 8.
Scope The scope of a variable is the context in which it is available. There are two possible scopes: local and
global. A local scope means the variable is available only in the specific area of an object or group in which
it is defined, and a global scope means the variable is available anywhere you can enter PlanetPress Talk
code. The way you define a variable determines its scope. The variables you define using the define
command have a local scope limited to the area of the object or group in which you define them. The
variables you define as global variables in PlanetPress Design have a global scope. Global variables in
PlanetPress Design appear in the Global Variables area of TreeView.
There are a number of ways to use variables in documents. See the PlanetPress Design User Guide for
examples of some of the most common uses people make of variables.
Local, Global, and System Variables
There are three categories of variables in PlanetPress Talk: system, global, and local.
1System Variables
System variables are variables that the system defines. There are two types of system variables: system
variables with a global scope and system variables with a local scope.
System variables with a global scope System variables with a global scope are available anywhere you
can insert a PlanetPress Talk expression in PlanetPress Design. You can use the value of a system
variable with a global scope but you cannot, except in one or two cases, modify it.
System variables with a local scope System variables with a local scope are available only within a well-
defined context. There are currently two system variables with a local scope: &height and &width.
Both are local to a specific object, group, or page. The system initializes &height and &width to,
What are variables?