13.07.2015 Views

Turbo Basic

Turbo Basic

Turbo Basic

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

Create successful ePaper yourself

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

PUT statement (graphics)FunctionSyntaxRemarksPUT plots the contents of a numeric array to the.graphics screen.PUT (x,y), array [, option](x,y) are the coordinates of the top left comer of the rectangle towhich the array will be transferred; they can be specified in eitherabsolute or relative form. array is a numeric array that contains thegraphic data to place on the screen. option is one of the reservedwords that follow, and controls how the information in array will beapplied to what's already on the screen:PUT OptionsPSETPRESETXORORANDEffectMap exact copy of image in arrayMap complementary copy of image in arrayPerform XOR operation.between array image andscreenPerform OR operation between array image andscreenPerform AND operation between array image andscreenThe PSET option causes· the data in the array to be put on thescreen exactly as GET found it originally, without regard for what isthere currently. PRESET maps. a complementary image to thescreen. For example, if the original data had attribute 3 at somepixel, the copy PUT to the screen with the PRESET attribute willhave attribute 0 for that pixel and vice versa. Similarly, attribute 1will be converted to attribute 2 and vice versa.The AND, OR, and XOR options perform a logical operationbetween each pixel in the destination region and before the PUTand the data in the buffer array. When moving objects across complexbackgrounds, the XOR option is especially useful; in fact, it isthe default. The· first PUT XOR draws the object to the screen; asecond application in the same place restores the background to itsprevious condition.<strong>Turbo</strong> <strong>Basic</strong> Reference Directory 315

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

Saved successfully!

Ooh no, something went wrong!