13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

PALETTE, PALETTE USING statementsFunctionSyntaxRemarksPALETTE and PALETTE USING allow you to change one or morecolors in the palette. (To use these statements you must have anEnhanced Graphics Adapter.)PALETTE[attribute,co7or]PALETTE USING integer array name(array index)attribute represents a color in the palette. color is an actual displaycolor that replaces the attribute in the palette. The color displayedon your screen depends on the screen mode setting and hardwaredisplay (see the SCREEN statement).The PALETTE statement allows you to change text or graphicswith a color currently on the screen and that change also affects anysubsequent text and graphics. This is a handy feature that saves youfrom redrawing text or graphics if you just want to change a color(see the example section).PALETTE also lets you map color numbers greater than 15 intothe palette. You can even display text invisibly against a hackgroundcolor. and then change the palette for the text color to make it suddenlybecome visible.If no arguments are specified in the PALETTE statement, thepalette is set to the predefined default colors.The PALETTE USING statement lets you modify all of yourpalette entries in a single statement. integer array name names thearray. When setting your palette. use array index to indicate theindex of the first array element in the array. (The majority of thetime you will specify 0 as the array index.) Make sure you dimensionthe integer array large enough to fit all sixteen palette entriesafter array index. Any attribute in the palette is paired with a colorfrom the integer array.Using a color argument of - 1 in an array entry effects no changein the paired attribute; however. all other negative values for colorare illegal.<strong>Turbo</strong> <strong>Basic</strong> Ref~rence Directory 293

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

Saved successfully!

Ooh no, something went wrong!