17.07.2013 Views

GWBASIC User's Manual

GWBASIC User's Manual

GWBASIC User's Manual

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

GW-BASIC <strong>User's</strong> Guide<br />

SCREEN 1 In mode 1, the COLOR statement has a unique syntax that includes a palette<br />

argument, which is an odd or even integer expression. This argument determines<br />

the set of display colors to use when displaying particular color numbers.<br />

For hardware configurations that do not have an IBM® Enhanced Graphics<br />

Adapter (EGA), the default color settings for the palette parameter are equivalent<br />

to the following:<br />

COLOR ,0 'Same as the next three PALETTE statements<br />

'1 = green, 2 = red, 3 = yellow<br />

COLOR ,1 'Same as the next three PALETTE statements<br />

'1 = cyan, 2 = magenta, 3 = white<br />

With the EGA, the default color settings for the palette parameter are equivalent<br />

to the following:<br />

COLOR ,0 'Same as the next three PALETTE statements<br />

PALETTE 1,2 'Attribute 1 = color 3 (green)<br />

PALETTE 2,4 'Attribute 2 = color 5 (red)<br />

PALETTE 3,6 'Attribute 3 = color 6 (brown)<br />

COLOR ,1 'Same as the next three PALETTE statements<br />

PALETTE 1,3 'Attribute 1 = color 3 (cyan)<br />

PALETTE 2,5 'Attribute 2 = color 5 (magenta)<br />

PALETTE 3,7 'Attribute 3 = color 15 (white)<br />

Note that a COLOR statement will override previous PALETTE statements.<br />

SCREEN 2 No effect. An "Illegal function call" error message occurs if COLOR is<br />

used in this mode.<br />

SCREEN 7- In these modes, no border color can be specified. The graphics background is<br />

SCREEN 10 given by the background color number, which must be in the valid range of<br />

color numbers appropriate to the screen mode. See the SCREEN statement<br />

reference pages for more details. The foreground color argument is the default<br />

line drawing color.<br />

Arguments outside valid numeric ranges result in "Illegal function call" errors.<br />

The foreground color may be the same as the background color, making displayed characters<br />

invisible. The default background color is black, or color number 0, for all display hardware<br />

configurations and all screen modes.<br />

With the Enhanced Graphics Adapter (EGA) installed, the PALETTE statement gives you<br />

flexibility in assigning different display colors to the actual color-number ranges for the<br />

foreground, background, and border colors discussed above. See the PALETTE statement<br />

reference pages for more details.<br />

file:///C|/Documents%20and%20Settings/Lorenzo/Desktop/GW%20Basic/COLOR.html (2 of 3)28/03/2004 21.29.16

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!