[<<Previous Entry]
[^^Up^^]
[Next Entry>>]
[Menu]
[About The Guide]
SCROLL
. Summary
scroll(int <x>, int <y>, int <x2>, int <y2>, int <lines>, int
<color>);
. Description
The scroll function is used to scroll or clear a region of the
screen. The area to handle is defined by <x>,<y> as the upper left
corner, and <x2>,<y2> as the lower right corner (the upper left cor-
ner of the screen is 0,0). If the <lines> parameter is a positive
value, text within the region is scrolled up that many lines. If
<lines> is a negative value, text within the region is scrolled down
that many lines. If <lines> is equal to 0, the entire region is
cleared. Empty lines scrolled into the region will have a color of
<color>.
Possible colors are numbered as follows:
Black 00
Blue 01
Green 02
Cyan 03
Red 04
Magenta 05
Brown 06
Light Grey 07
Dark Grey 08
Light Blue 09
Light Green 10
Light Cyan 11
Light Red 12
Light Magenta 13
Yellow 14
White 15
To obtain a color attribute value for a color combination, the for-
mula is
color attribute value =
foreground color value + (16 * background color value)
Therefore, a Yellow character on a Blue background would have a
color attribute value of 30 (14 + (16 * 1)).
. Return Value
None.
. Example
scroll(0, 0, 79, 24, 10, 7); // scroll screen up 10 lines
See Also:
box
clear_scr
color chart
This page created by ng2html v1.05, the Norton guide to HTML conversion utility.
Written by Dave Pearson