QBasic 1.1: POINT Function


POINT {(n%) | (x%,y%)}

Description / Parameter(s)

(n%) Indicates the type of coordinate to return:
0The current viewport x coordinate
1The current viewport y coordinate
2The current window x coordinate
3The current window y coordinate
(x%,y%) The coordinates of the pixel that POINT checks for color.
If the coordinates are outside the current viewport, POINT returns -1.


'This example requires a color graphics adapter. SCREEN 1 LINE (0, 0)-(100, 100), 2 LOCATE 14, 1 FOR y% = 1 TO 10 FOR x% = 1 TO 10 PRINT POINT(x%, y%); NEXT x% PRINT NEXT y%