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 />

The number of bytes required to get a 10 by 12 image into an integer array is 4+INT((10*2<br />

+7)/8)*12, or 40 bytes. An integer array with at least 20 elements is necessary.<br />

If OPTION BASE equals zero, an integer array can be used to examine the x and y dimensions<br />

and the data. The x dimension is in element 0 of the array, and the y dimension is in element 1.<br />

Integers are stored low byte first, then high byte, but data is transferred high byte first (left-most),<br />

then low byte.<br />

It is possible to get an image in one mode and put it in another, although the effect may be quite<br />

strange because of the way points are represented in each mode.<br />

Examples:<br />

10 CLS: SCREEN 1<br />

20 PSET(130, 120)<br />

30 DRAW "U25; E7; R20; D32; L6; U12; L14"<br />

40 DRAW "D12;L6":PSET(137,102)<br />

50 DRAW "U4; E4; R8; D8; L12"<br />

60 PSET(137, 88)<br />

70 DRAW "E4; R20; D32; G4": PAINT(139, 87)<br />

80 DIM A(500)<br />

90 GET (125, 130)-(170, 80),A<br />

100 FOR I=1 TO 1000: NEXT I<br />

110 PUT (20,20), A, PSET<br />

120 FOR I=1 TO 1000: NEXT I<br />

130 GET (125,130)-(170, 80),A<br />

140 FOR I=1 TO 1000: NEXT I<br />

150 PUT (220,130), A, PRESET<br />

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

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

Saved successfully!

Ooh no, something went wrong!