Expand/Shrink

scroll

Definition: scroll(integer amount, integer topline, integer btmline)
Description: Scroll a region of text on the screen either up (amount positive) or down (amount negative) by the specified number of lines. The region is the series of lines on the screen from topline to btmline, inclusive. New blank lines will appear at the top or bottom.
pwa/p2js: Not supported
Comments: You could perform the scrolling operation using a series of calls to puts(), but scroll() is much faster.

The position of the cursor after scrolling is not defined.

NB: this routine has not been extensively tested and probably still contains several minor bugs, especially for any amount other than +/-1.
Example: demo\scroll.exw
Implementation: See builtins\pScrollN.e (an autoinclude) for details of the actual implementation.
See Also: clear_screen, text_rows