DEC Text Processing Utility Program Development

5.6 Using DECTPU Startup Files

Whenever you want to add new procedures, variables, learn sequences, or key definitions to a section file, edit the command file to include the new items, and then recompile the command file to produce a section file with the new items. For example, if you want to add key definitions for the arrow keys, you could edit the file MINI.TPU and add the following statements after any procedures in the file:

DEFINE_KEY ("MOVE_VERTICAL (-1)", UP);

DEFINE_KEY ("MOVE_VERTICAL (1)", DOWN);

DEFINE_KEY ("MOVE_HORIZONTAL (1)", RIGHT);

DEFINE_KEY ("MOVE_HORIZONTAL (-1)", LEFT);

Recompile the command file with the following command:

$ EDIT/TPU/NOSECTION/COMMAND=MINI.TPU

After you have completed the previous steps, you can use the section file you created to invoke DECTPU with the new key definitions included.

An alternate way of adding these key definitions to your section file is to enter the definitions as text in the current buffer. You could then press the Tab key (the command prompt key for the minimal interface) and enter the following command after the prompt:

TPU Statement: EXECUTE (CURRENT_BUFFER);

This causes the new key definitions to be added to your current editing context. To add the definitions to the section file so you can use them in future sessions, enter the following statement at the Command prompt:

Command: SAVE ("sys$login:mini");

If you want to save the DECTPU source code for the key definitions, write out the current buffer or use the EXIT built-in procedure to leave the DECTPU session so that the contents of the buffer are written to a file.

5.6.5.4 Recommended Conventions for Section Files

A section file that implements a layered application should include the following procedures:

TPU$INIT_PROCEDURE

TPU$LOCAL_INIT

If your application is to support initialization files, the section file that implements the application should also include a procedure called TPU$INIT_ POSTPROCEDURE. This procedure should contain the DECTPU statements that implement or handle the initialization files.

For information on EVE’s implementation of initialization files, see Section 5.6.7.

The TPU$INIT_PROCEDURE procedure should perform the following operations:

Initialize all global variables to their startup values

Create all required work spaces for the editor (see the list of special purpose buffers and windows in Table 5–2)

You can add other functions to TPU$INIT_PROCEDURE, but it should perform at least these two operations.

If your application allows the end user to customize the application by using a command file, you may want to make available to the user a procedure called TPU$LOCAL_INIT. (Although this name is not required, it is commonly used by DECTPU programmers.)

DEC Text Processing Utility Program Development 5–23

Page 123
Image 123
Compaq AA-PWCBD-TE Command Save sys$loginmini, Recommended Conventions for Section Files, Tpu$Initprocedure Tpu$Localinit

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.