Document revision date: 30 March 2001
[Compaq] [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]
[OpenVMS documentation]

DEC Text Processing Utility Reference Manual


Previous Contents Index


SET (ACTIVE_AREA)


Format

SET (ACTIVE_AREA, window, column, row [[, width, height ]])


Parameters

ACTIVE_AREA

A keyword that directs DECTPU to set an attribute of the active area.

window

The window in which you want to define the active region.

column

An integer that specifies the leftmost column of the active region.

row

An integer that specifies the topmost row of the active region. If you use 0, the active row is the status line.

width

An integer that specifies the width in columns of the active region. Defaults to 1.

height

An integer that specifies the height in rows of the active region. Defaults to 1.

Description

The SET (ACTIVE_AREA) procedure designates the specified area as the active area in a DECTPU window. The active area is the region in a window in which DECTPU ignores movements of the mouse pointer for purposes of distinguishing clicks from drags. When you press down a mouse button, DECTPU interprets the event as a click if the upstroke occurs in the active area with the downstroke. If the upstroke occurs outside the active area, DECTPU interprets the event as a drag operation.

A DECTPU layered application can have only one active area at a time, even if the application has more than one window visible on the screen. An active area is valid only if you are pressing a mouse button. The default active area occupies one character cell. By default, the active area is located on the character cell that contains the cursor.

For information on mouse button clicks, see the OSF/Motif Style Guide.

Signaled Errors

TPU$_BADVALUE ERROR An integer parameter was specified with a value outside the valid range.
TPU$_EXTRANEOUSARGS ERROR One or more extraneous arguments were specified for a DECwindows built-in.
TPU$_INVPARAM ERROR One of the parameters was specified with data of the wrong type.
TPU$_NORETURNVALUE ERROR SET (ACTIVE_AREA) cannot return a value.
TPU$_TOOFEW ERROR Too few arguments passed to the SET (ACTIVE_AREA) built-in.
TPU$_TOOMANY ERROR Too many arguments passed to the SET (ACTIVE_AREA) built-in.

Example

The following example creates a rectangular active area from the upperleft character position to the character in column 10 of row 2:

SET (ACTIVE_AREA, CURRENT_WINDOW, 1, 1, 10, 2); 
      


SET (AUTO_REPEAT)


Format

SET (AUTO_REPEAT, {ON |OFF |1 |0})


Parameters

AUTO_REPEAT

A keyword that indicates that SET is to control whether DECTPU repeats keystrokes as long as you hold down a key. By default, AUTO_REPEAT is set ON (1).

ON, 1

Specifies that a key press should continue to generate characters until the key is released.

OFF, 0

Requires a separate keystroke for each character generated.

Description

The SET (AUTO_REPEAT) procedure controls whether DECTPU repeats keystrokes as long as you hold down a key. DECTPU sends an escape sequence to the terminal to set AUTO_REPEAT on or off.

The autorepeat feature affects all keyboard keys on the VT100 series of terminals except the following keys:

The autorepeat feature affects all keyboard keys on the VT400, VT300, and VT200 series of terminals except the following keys:

If you want to slow down the movement of the cursor, you can use SET (AUTO_REPEAT) within a procedure that causes cursor motion. Because of the time the terminal requires to process the escape sequence that DECTPU sends, if you turn AUTO_REPEAT off before moving the cursor and on after moving the cursor, you slow down the cursor movement. You may find it useful to slow the cursor motion at the top or bottom of a window. The second example in the example section shows how to do this.

SET (AUTO_REPEAT) has no effect if you use it in DECwindows DECTPU.

Signaled Errors

TPU$_TOOFEW ERROR SET (AUTO_REPEAT) requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR The keyword must be either ON or OFF.
TPU$_UNKKEYWORD ERROR You specified an unknown keyword.

Examples

The following example turns AUTO_REPEAT off:
#1

SET (AUTO_REPEAT, OFF) 
 
      

The following example shows how to turn AUTO_REPEAT off and on to slow the cursor movement:

#2

! Two procedures that slow the scrolling action 
 
PROCEDURE user_slow_up_arrow 
   SET (AUTO_REPEAT, OFF); 
   MOVE_VERTICAL (-1); 
   SET (AUTO_REPEAT, ON); 
ENDPROCEDURE; 
 
PROCEDURE user_slow_down_arrow 
   SET (AUTO_REPEAT, OFF); 
   MOVE_VERTICAL (1); 
   SET (AUTO_REPEAT, ON); 
ENDPROCEDURE; 
 
      


SET (BELL)


Format

SET (BELL, {ALL |BROADCAST}, {ON |OFF |1 |0})


Parameters

BELL

A keyword that indicates that SET is to control whether DECTPU rings the terminal bell when a message is written to the message window.

ALL

Indicates that the second parameter (ON or OFF) applies to all messages.

BROADCAST

Indicates that the second parameter applies to broadcast messages only.

ON, 1

Causes the terminal bell to ring when a message is written to the message window.

OFF, 0

Turns off the audible signal of the terminal bell.

Description

The SET (BELL) procedure controls whether DECTPU rings the terminal bell when a message is written to the message window. When the bell is on, the terminal bell rings to signal the fact that a message is being written to the message window. When you use ALL, internal DECTPU messages as well as broadcast messages cause the terminal bell to ring. To cause DECTPU messages of success and informational severity level to be written to the message buffer, you must have used the SET ({INFORMATIONAL|SUCCESS}, ON) built-in procedure. When you use BROADCAST, only broadcast messages such as mail notifications and REPLY messages cause the bell to ring.

SET (BELL, ALL, {ON|OFF}) affects the setting of SET (BELL, BROADCAST, {ON|OFF}). If you want the behavior of broadcast messages to be different from other messages, use the SET (BELL, BROADCAST, {ON|OFF}) built-in procedure after using SET (BELL, ALL, {ON|OFF}).

DECTPU causes the bell to ring as a signal that a message is being written to the message window, not as an interpretation of a bell character in the message text. Bell characters in the message text are not interpreted; they are displayed. Positioning to the message window and moving the cursor to a bell character in the message text do not cause the terminal bell to ring.

You can also use DCL commands to affect the display of broadcast messages within DECTPU. If you use the SET TERMINAL/NOBROADCAST command at the DCL level, no broadcast messages are sent to your terminal. With the DCL SET BROADCAST command, you can enable or disable certain classifications of broadcast messages.

The bell is off by default.

Signaled Errors

TPU$_TOOFEW ERROR SET (BELL) requires three parameters.
TPU$_TOOMANY ERROR You specified more than three parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR You specified an invalid keyword.

Examples

The following example causes the terminal bell to ring when a broadcast message is written to the message window:
#1

SET (BELL, BROADCAST, ON) 
 
      

The following example uses SET (BELL, ALL, ON) to cause the bell to ring for the message that is being sent in the second statement. After the message is written, the bell is turned off. You use SET (BELL, BROADCAST, ON) to cause broadcast messages to ring the terminal bell.

#2

PROCEDURE user_ring_bell (msg_string) 
 
   SET (BELL, ALL, ON);      ! Turn bell on 
   MESSAGE (msg_string);     ! Write message text to message buffer 
   SET (BELL, ALL, OFF);     ! Turn bell off 
   SET (BELL, BROADCAST,ON); ! Turn bell on for broadcast messages 
ENDPROCEDURE; 
 
      


SET (CLIENT_MESSAGE)


Format

SET (CLIENT_MESSAGE,SCREEN, {buffer |learn_sequence |program |range |string |NONE})


Parameters

CLIENT_MESSAGE

A keyword that indicates that SET is being used to designate a client message action routine.

SCREEN

A keyword used to preserve compatibility with future versions of DECTPU.

buffer

The buffer that contains the code to be executed when DECTPU receives a client message.

learn_sequence

The learn sequence to be executed when DECTPU receives a client message.

program

The program to be executed when DECTPU receives a client message.

range

The range that contains the code to be executed when DECTPU receives a client message.

string

The string that contains the code to be executed when DECTPU receives a client message.

NONE

A keyword that directs DECTPU to delete the current client message routine. This is the default if you do not specify the optional third parameter.

Description

The SET (CLIENT_MESSAGE) procedure designates the action routine to be executed when DECwindows DECTPU receives a client message from another DECwindows application. A client message is a communication from one DECwindows application to another. The message enables the sending application to generate an event on the queue of the receiving application.

If the optional parameter is not specified, NONE is the default. When NONE is specified or used by default, DECTPU deletes the current client message routine. When no client message routine is defined, your application is not informed when DECTPU receives a client message.

Signaled Errors

TPU$_COMPILEFAIL WARNING Compilation failed.
TPU$_TOOFEW ERROR You specified too few parameters.
TPU$_TOOMANY ERROR You specified too many parameters.
TPU$_BADKEY ERROR You specified an invalid keyword.
TPU$_ARGMISMATCH ERROR Argument has the wrong type.
TPU$_REQUIRESDECW ERROR SET(CLI...) is valid only in DECwindows DECTPU.

SET (COLUMN_MOVE_VERTICAL)


Format

SET (COLUMN_MOVE_VERTICAL, {ON |OFF |1 |0})


Parameters

COLUMN_MOVE_VERTICAL

Specifies that you want to use SET to control how the MOVE_VERTICAL built-in procedure moves the cursor.

ON, 1

Directs the MOVE_VERTICAL built-in procedure to place the cursor in the same column on each new line unless doing so would put the cursor in the middle of a tab. If the cursor would be placed in a tab, MOVE_VERTICAL places the cursor at the beginning of the tab.

OFF, 0

Directs the MOVE_VERTICAL built-in procedure to place the cursor at the same offset in each new record to which the cursor moves. This behavior is the default for SET (COLUMN_MOVE_VERTICAL). Because DECTPU counts a tab as one character when determining the offset, the cursor's column location can change dramatically after you use MOVE_VERTICAL.

Description

The SET (COLUMN_MOVE_VERTICAL) procedure controls how the cursor moves when the MOVE_VERTICAL built-in procedure moves the cursor. When SET (COLUMN_MOVE_VERTICAL) is set to ON, you can get a different result from using MOVE_VERTICAL (n) than from using MOVE_VERTICAL (1) n times. When you use MOVE_VERTICAL (3), for example, the built-in tries to keep the cursor in the column the cursor occupied just before execution of MOVE_VERTICAL (3). When you use MOVE_VERTICAL (1) three times, the built-in resets the column where DECTPU is trying to keep the cursor. Thus, if the first MOVE_VERTICAL (1) moves the cursor left to the beginning of a tab, the second MOVE_VERTICAL (1) does not move the cursor to the right again.

When SET (COLUMN_MOVE_VERTICAL) is set to OFF, MOVE_VERTICAL (n) produces the same results as MOVE_VERTICAL (1) n times.

To determine whether COLUMN_MOVE_VERTICAL is set to ON or OFF, use the following statement:


boolean := GET_INFO (SYSTEM, "COLUMN_MOVE_VERTICAL") 
This GET_INFO call returns 1 if COLUMN_MOVE_VERTICAL is set to ON; 0 if it is set to OFF.

If you have previously written extensions to EVE and want to layer the extensions on EVE, you may have to rewrite some procedures because EVE sets COLUMN_MOVE_VERTICAL to ON.

For instance, if your extension contains the following code and if the first line has a left margin further to the right than the second line, the code may not work as intended:


MOVE_HORIZONTAL (-CURRENT_OFFSET); ! Go to beginning of line 
MOVE_VERTICAL (1);                 ! Move down a line 

To compensate for the fact that EVE sets COLUMN_MOVE_VERTICAL to ON, you can substitute the following code for the previous code:


POSITION (LINE_END);           !  Go to end of existing line 
MOVE_HORIZONTAL (1);           !  Advance to start of next line 

Signaled Errors

TPU$_TOOFEW ERROR SET (COLUMN_MOVE_VERTICAL) requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR The keyword must be either ON or OFF.

Example

In the following example, the symbol > represents a tab character. The underscore shows the cursor location. Suppose you have the following two lines of text in a buffer, with the cursor on the c in the first line:


abcdefg 
 
a>......bcdefg 

If you use the following code, the cursor ends up pointing to the b on the second line:


SET (COLUMN_MOVE_VERTICAL, OFF); 
MOVE_VERTICAL (1); 
After the MOVE_VERTICAL (1) statement, the cursor location is as follows:


abcdefg 
 
a>......bcdefg 

On the other hand, suppose you have the same text, as follows:


abcdefg 
 
a>......bcdefg 

If you use the following code, the cursor ends up pointing to the beginning of the tab on the second line:


SET (COLUMN_MOVE_VERTICAL, ON); 
MOVE_VERTICAL (1); 
After the MOVE_VERTICAL (1) statement, the cursor location is as follows:


abcdefg 
 
a>......bcdefg 


SET (CROSS_WINDOW_BOUNDS)


Format

SET (CROSS_WINDOW_BOUNDS, {ON |OFF |1 |0})


Parameters

CROSS_WINDOW_BOUNDS

A keyword that specifies that SET is to control the way the CURSOR_VERTICAL built-in procedure behaves at a window boundary. The default setting for CROSS_WINDOW_BOUNDS is ON (preserving the behavior from previous versions of DECTPU).

ON, 1

Causes the CURSOR_VERTICAL built-in procedure to cross window boundaries and to ignore scrolling regions. However, even when crossing of window bounds is enabled, the CURSOR_VERTICAL built-in procedure still obeys screen boundaries. That is, if CURSOR_VERTICAL brings the cursor to the edge of the screen, DECTPU scrolls text into the window rather than making the cursor invisible.

OFF, 0

Prevents the CURSOR_VERTICAL built-in procedure from crossing window boundaries and causes CURSOR_VERTICAL to obey scrolling regions.

Description

The SET (CROSS_WINDOW_BOUNDS) procedure controls how the cursor behaves when the CURSOR_VERTICAL built-in executes at a window boundary.

Signaled Errors

TPU$_TOOFEW ERROR SET (CROSS_WINDOW_BOUNDS) requires two parameters.
TPU$_TOOMANY ERROR You specified more than two parameters.
TPU$_INVPARAM ERROR One or more of the specified parameters have the wrong type.
TPU$_BADKEY ERROR You specified an invalid keyword.

Example

The following example prevents subsequent invocations of the CURSOR_VERTICAL built-in from crossing window boundaries and causes the screen to scroll if the cursor moves into a scrolling region. This is the EVE default.

SET (CROSS_WINDOW_BOUNDS, OFF) 
      


SET (DEBUG)

This built-in has five valid syntax permutations. You cannot use any combinations of parameters not shown in this description.


Format

SET (DEBUG, PROGRAM, {buffer |program |range |string1})


Parameters

DEBUG

A keyword that indicates that SET is to control various attributes of a debugging program that helps locate DECTPU programming errors.

PROGRAM

A keyword that indicates that DECTPU is to use a user-written debugger.

buffer

An expression evaluating to a buffer that contains a procedure or program. The statement SET (DEBUG, PROGRAM, buffer) directs DECTPU to use the user-written debugger contained in the specified buffer during the current debugging session.

program

A variable of type program. The statement SET (DEBUG, PROGRAM, program) directs DECTPU to use the user-written debugger contained in the specified program during the current debugging session.

range

An expression evaluating to a range that contains a procedure or program. The statement SET (DEBUG, PROGRAM, range) directs DECTPU to use the user-written debugger contained in the specified range during the current debugging session.

string1

A string that contains executable DECTPU statements. The statement SET (DEBUG, PROGRAM, string1) directs DECTPU to use the DECTPU statements in the specified string during the current debugging session.

Format

SET (DEBUG, {ON |OFF |1 |0})


Parameters

DEBUG

A keyword that indicates that SET is to control various attributes of a debugging program that helps locate DECTPU programming errors.

ON, 1

Enables single-stepping. The statement SET (DEBUG, ON) directs DECTPU to execute just one line of code and then return control to the debugger.

OFF, 0

Disables single-stepping. The statement SET (DEBUG, OFF) disables single-step execution. Because single-stepping is off by default, this format is useful only to turn off single-stepping after single-stepping has been turned on.

Format

SET (DEBUG, {ON |OFF |1 |0}, string2)


Parameters

DEBUG

A keyword that indicates that SET is to control various attributes of a debugging program that helps locate DECTPU programming errors.

ON, 1

Sets a breakpoint. The statement SET (DEBUG, ON, string2) directs DECTPU to set a breakpoint at the procedure named by string2.

OFF, 0

Cancels one or more breakpoints. The statement SET (DEBUG, OFF, string2) cancels a breakpoint previously set at the procedure named by string2.

string2

The name of a procedure. The format SET (DEBUG, ON, string2) or SET (DEBUG, OFF, string2) sets or cancels a breakpoint at the procedure specified by string2.

Format

SET (DEBUG, OFF, ALL)


Parameters

DEBUG

A keyword that indicates that SET is to control various attributes of a debugging program that helps locate DECTPU programming errors.

OFF, 0

Cancels breakpoints. The statement SET (DEBUG, OFF, ALL) cancels all breakpoints set during the debugging session.

ALL

A keyword that indicates that all breakpoints are to be canceled. The statement SET (DEBUG, OFF, ALL) clears all breakpoints.

Format

SET (DEBUG, string3, value)


Parameters

DEBUG

A keyword that indicates that SET is to control various attributes of a debugging program that helps locate DECTPU programming errors.

string3

The name of a global variable, local variable, or parameter. When you use string3 to specify a local variable or a parameter, the variable or parameter must be in the procedure you are currently debugging. The statement SET (DEBUG, string3, value) deposits the specified value in the variable or parameter specified by string3.

value

A value of any data type in DECTPU. The statement SET (DEBUG, string, value) deposits the specified value in the global variable, local variable, or parameter named by the string.

Description

The SET (DEBUG) procedure controls various attributes of a debugging program that helps locate DECTPU programming errors.

You use SET (DEBUG) to write or use user-written debuggers. You cannot freely mix parameters when using SET (DEBUG). The only valid usages are those shown in the format sections of this built-in.

Signaled Errors

TPU$_NOCURRENTBUF WARNING There is no current buffer.
TPU$_NONAMES WARNING No names match the one requested.
TPU$_BADKEY ERROR An unknown keyword was used as an argument.
TPU$_ARGMISMATCH ERROR You specified an unsupported data type.

Examples

The following example causes the debugger to be invoked each time the procedure "user_remove" is called:
#1

SET (DEBUG, ON, "user_remove") 
 
 
      


Previous Next Contents Index

  [Go to the documentation home page] [How to order documentation] [Help on this site] [How to contact us]  
  privacy and legal statement  
6020PRO_025.HTML