DEC Text Processing Utility Data Types

3.1 Array Data Type

int_array := CREATE_ARRAY (10, 1);

int_array {1} := "Store a string in the first element"; int_array {8} := CURRENT_BUFFER;

int_array {42} := "This is a dynamically created element.";

If you assign a value to an element that has not yet been created, then that element is dynamically created and both the index and the value are stored. Subsequent references to that element index return the stored value.

In most cases, if you reference an element that has not yet been created and you do not assign a value to the nonexistent element, DECTPU does not create the element. DECTPU simply returns the data type unspecified. However, if you reference a nonexistent element by passing the nonexistent element to a procedure, DECTPU adds a new element to the array, giving the element the index you pass to the procedure. DECTPU assigns to this new element the data type unspecified.

You can delete an element in the array by assigning the data type unspecified to the element. For example, the following statement deletes the element my_array {"fred"}:

my_array {"fred"} := TPU$K_UNSPECIFIED;

The following code fragment shows how you can find all the indexes in an array:

the_index := GET_INFO (the_array, "FIRST");

LOOP

EXITIF the_index = TPU$K_UNSPECIFIED;

.

.

.

the_index := GET_INFO (the_array, "NEXT");

ENDLOOP;

Note

DECTPU does not guarantee the order in which it will return the array indexes.

3.2 Buffer Data Type

A buffer is a work space for manipulating text. A buffer can be empty or it can contain text records. You can have multiple buffers. A value of the buffer data type is returned by the CREATE_BUFFER, CURRENT_BUFFER, and GET_INFO built-in procedures. CREATE_BUFFER is the only built-in procedure that creates a new buffer. CURRENT_BUFFER and GET_INFO return pointers to existing buffers.

The following statement makes the variable my_buf a variable of type buffer:

my_buf := CREATE_BUFFER ("my_buffer");

When you use a buffer as a parameter for DECTPU built-in procedures, you must use as the parameter the variable to which you assigned the buffer. For example, if you want to erase the contents of the buffer created in the preceding statement, enter the following:

ERASE (my_buf);

DEC Text Processing Utility Data Types 3–3

Page 43
Image 43
Compaq AA-PWCBD-TE manual Buffer Data Type

AA-PWCBD-TE specifications

The Compaq AA-PWCBD-TE is a highly regarded laptop battery designed to provide reliable power to a range of Compaq laptop models. As technology continues to evolve, the necessity for efficient and long-lasting batteries becomes increasingly important, especially for students, professionals, and anyone reliant on portable computing.

One of the standout features of the AA-PWCBD-TE is its impressive capacity, designed to enhance the performance of your device. With a power capacity of around 5200 mAh, this battery is engineered to provide extended usage times, allowing users to work on the go without frequent interruptions for recharging. The battery supports efficient energy management, contributing to the overall longevity of the device.

Additionally, the AA-PWCBD-TE integrates advanced lithium-ion technology, which is favored for its reliability and minimal memory effect. Lithium-ion batteries typically offer a higher energy density compared to older technologies, meaning they can store more energy in a smaller size. This technology also supports faster charging times, making it a convenient solution for busy users.

Safety is another vital characteristic of the AA-PWCBD-TE. It features built-in protection against overcharging, overheating, and short-circuit conditions, which helps ensure the safety of both the battery and the device itself. This level of protection is crucial, especially in professional environments where equipment failure can lead to productivity losses.

Compatibility is also a key aspect of the AA-PWCBD-TE, as it is designed to fit a variety of Compaq laptop models. Users can easily determine whether this battery is suitable for their specific model, simplifying the buying process and ensuring optimal performance.

In terms of weight and dimensions, the AA-PWCBD-TE is designed to be lightweight and compact, adding minimal bulk to the laptop while still delivering powerful performance. Users can enjoy the balance of efficiency and portability, making it an ideal choice for those who travel frequently or require a battery that doesn't compromise on power.

Overall, the Compaq AA-PWCBD-TE stands out as a dependable and efficient laptop battery that enhances the user experience. With its impressive capacity, cutting-edge technology, and safety features, it is a valuable accessory for anyone looking to improve their mobile computing capabilities.