contents.gifprev1.gifnext1.gif

SCROLL

Moves the text, not the cursor, a set number of lines.

Description:

The number of lines to move in SCROLL is passed as the optional second parameter; which window to move in is passed as the first. The number of lines scrolled is returned, if desired. The second parameter has a default value of 0. If the number is negative, the editing position is moved back towards the beginning of the buffer. If the second parameter = 0, the text is scrolled until the user stops it with CTRL/C, or the end/beginning of the buffer is reached.

SCROLL updates the window and begins scrolling without waiting for the screen manager to be called and does not work under the following conditions:

1. SET(SCREEN_UPDATE, OFF) has been called.

2. NODISPLAY set at the command line.

3. The window is not visible.

Character padding will occur if the cursor position does not have a character associated with it.

Syntax:

integer := SCROLL (window )

integer := SCROLL (window, number_of_lines_to_scroll )

Example:

The following example scrolls towards the end of the buffer until either the end is reached or the user stops the scrolling. It uses the CURRENT_WINDOW built-in.

SCROLL (CURRENT_WINDOW, 0);

Errors:

TPU$_CONTROLC Execution aborted by [CTRL-C].

TPU$_WINDNOTMAPPED The scroll window must be mapped.

Related Builtins:

CURSOR_VERTICAL

MOVE_VERTICAL

REFRESH

SET(SCREEN_UPDATE)

UPDATE