3 integer data type – Compaq DEC Text Processing Utility AA-PWCBD-TE User Manual
Page 44
DEC Text Processing Utility Data Types
3.2 Buffer Data Type
In this statement, my_buf is the identifier for the variable my_buf. The string
"
my_buffer
"
is the name associated with the buffer. The distinction between the
name of the buffer variable and the name of the buffer is useful when you are
developing an application layered on DECTPU. For example, the application can
use an internal buffer name such as main_buffer to manipulate a given buffer
(such as the main buffer in EVE). However, the application can associate the
name of your input file with the buffer, making it easier for you to remember
which buffer contains the contents of a given file.
If you want to delete the buffer itself, use the DELETE built-in procedure with
the buffer variable as the parameter.
More than one buffer variable can represent the same buffer. The following
statement causes both my_buf and old_buf to point to the same buffer:
old_buf := my_buf;
A buffer remains in DECTPU’s internal list of buffers even when there are no
variables pointing to it. You can use the GET_INFO built-in procedure to retrieve
buffers from DECTPU’s internal list.
Creating a buffer does not cause the information contained in the buffer to
become visible on the screen. The buffer must be associated with a window that
is mapped to the screen for the buffer contents to be visible. Editing can take
place in a buffer even if the buffer is not mapped to a window on the screen.
The current buffer contains the active editing point. The editing point can be
different from the cursor position, and often each is in a different location. When
the current buffer is associated with a visible window (one that is mapped to the
screen), the editing point and the cursor position are usually the same.
At present, a line in a buffer can contain up to 32767 characters. If you try
to create a line that is longer than 32767 characters, DECTPU truncates the
inserted text and inserts only the amount that fills the line to 32767 characters.
If you try to read a file that contains lines longer than 32767 characters, DECTPU
truncates all characters after the 32767 characters.
You can associate a single buffer with 0 to 255 windows for editing purposes. You
can have a buffer visible in two windows so that you can look at two separate
parts of the same file. For example, you could display a set of declarations in one
window and code that uses the declarations in another window. Edits made to a
buffer show up in all windows to which that buffer is mapped and in which the
editing point is visible.
3.3 Integer Data Type
DECTPU uses the integer data type to represent numeric data. DECTPU
performs only integer arithmetic. The type integer consists of the whole number
values ranging from –2,147,483,648 to 2,147,483,647. In DECTPU, an integer
constant is a sequence of decimal digits; no commas or decimal points are allowed.
The following example assigns a value of the integer data type to the variable x:
x := 12345;
3–4 DEC Text Processing Utility Data Types