DEC Text Processing Utility Data Types

3.7 Pattern Data Type

3.7.3 Using Pattern Operators

The following are the DECTPU pattern operators:

Concatenation operator ( + )

Link operator ( & )

Alternation operator ( )

Partial pattern assignment operator ( @ )

The pattern operators are equal in DECTPU’s precedence of operators. For more information on the precedence of DECTPU operators, see Chapter 4. Pattern operators associate from left to right. Thus, the following two DECTPU statements are identical:

pat1 := a + b & c d @ e;

pat1 := (((a + b) & c) d) @ e;

In addition to the pattern operators, you can use two relational operators, equal ( = ) and not equal (<>), to compare patterns.

The following sections discuss the pattern operators.

3.7.3.1 + (Pattern Concatenation Operator)

The concatenation operator ( + ) tells SEARCH or SEARCH_QUIETLY that text matching the right pattern element must immediately follow the text matching the left pattern element in order for the complete pattern to match. In other words, the concatenation operator specifies a search in which the right pattern element is anchored to the left. For example, the following pattern matches only if there is a line in the searched text that ends with the string abc.

pat1 := "abc" + line_end;

If SEARCH or SEARCH_QUIETLY finds such a line, the built-in returns a range that contains the text abc and the end of the line.

Compaq recommends that you use the concatenation operator rather than the link operator unless you specifically require the link operator.

3.7.3.2 & (Pattern Linking Operator)

The link operator ( & ) is similar to the concatenation operator ( + ). Unlike the concatenation operator, the link operator does not necessarily cause an anchored search. If you define a pattern by specifying any pattern element, an ampersand ( & ), and a pattern or keyword variable, a search for each subpattern is not an anchored search.

If you link elements other than pattern variables, the search is an anchored search unless you specify otherwise. Strings, constants, and the results of built-in procedures are not pattern variables.

For example, suppose you defined two subpattern variables as follows:

p1 := "a" & ANY("012345678");

p2 := "c" & ARB (1);

You then define the following pattern variable:

pat_var := p1 & p2

DEC Text Processing Utility Data Types 3–13

Page 53
Image 53
Compaq AA-PWCBD-TE manual 3.1 + Pattern Concatenation Operator, 3.2 & Pattern Linking Operator

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.