DEC Text Processing Utility Data Types

3.10 Range Data Type

3.10 Range Data Type

A range contains all the text between (and including) two markers. You can form a range with the CREATE_RANGE built-in procedure. A range is associated with characters within a buffer. If the characters within a range move, the range moves with them. If characters are added or deleted between two markers that delimit a range, the size of the range changes. If all the characters in a range are deleted, the range moves to the nearest character.

DECTPU does not support ranges of zero length unless the range begins and ends at the end of a buffer. All other ranges contain at least one character (which could be a space character) or a line-end (if the range is created at the end of a line).

If you create a range by specifying a free marker as a parameter to the CREATE_ RANGE built-in, DECTPU creates a new marker and binds the marker to the text nearest to the free marker position. DECTPU uses the new bound marker as the range delimiter. This operation does not cause insertion of padding spaces.

Deleting the markers used to create a range does not affect the range.

To convert the contents of a range to a string, use either the STR or the SUBSTR built-in procedure.

To remove a range, use the DELETE built-in procedure with the range as a parameter. For example, the following statement deletes the range range1:

DELETE (range1);

You can also delete a range by removing all variable references to the range. To do this, set all variables referring to the range to some other value, such as 0. For example, the following statement sets the variable range1 to 0:

range1 := 0;

Deleting a range does not remove the characters of the range from the buffer; it merely removes the range data structure. To remove the characters of a range, use the ERASE built-in procedure with the range as a parameter. For example, ERASE (my_range) removes all the characters in my_range, but it does not remove the range structure. Using the statement DELETE (range_variable) removes the range data structure, but does not affect the characters in the range.

The following built-in procedures, as well as the partial pattern assignment operator, all return values of the range data type:

CHANGE_CASE

CREATE_RANGE

EDIT

GET_INFO

READ_CLIPBOARD

READ_GLOBAL_SELECT

SEARCH

SEARCH_QUIETLY

SELECT_RANGE

TRANSLATE

DEC Text Processing Utility Data Types 3–19

Page 59
Image 59
Compaq AA-PWCBD-TE manual DEC Text Processing Utility Data Types Range 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.