7.67.52015-05-06

Variables

What are 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.

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 have a global scope. Global variables in PlanetPress appear in the Global Variables area of TreeView.

There are a number of ways to use variables in documents. See the PlanetPress User Guide for examples of some of the most common uses people make of variables.