3
DEC Text Processing Utility Data Types
A data type is a group of elements that ‘‘belong together’’; the elements are all
formed in the same way and are treated consistently. The data type of a variable
determines the operations that can be performed on it. The DECTPU data types
are represented by the following keywords:
• ARRAY
• BUFFER
• INTEGER
• KEYWORD
• LEARN
• MARKER
• PATTERN
• PROCESS
• PROGRAM
• RANGE
• STRING
• UNSPECIFIED
• WIDGET
• WINDOW
You use data types to interpret the contents of a variable. Unlike many
programming languages, DECTPU permits any variable to have any type of data
as a value. DECTPU has no declaration statement to restrict the type of data
that you can assign to a variable. DECTPU variables take on a data type when
they are placed on the left-hand side of an assignment statement. The right-hand
side of the assignment statement determines the data type of the variable.
Although you can construct variables freely, DECTPU built-in procedures require
that their parameters be of specific data types. Each built-in procedure can
operate only on certain data types. Some built-in procedures return a value of a
certain data type when they are executed. The following sections describe the
DECTPU data types.
DEC Text Processing Utility Data Types 3–1