qbasic.hlp (Topic list)
POINT Function
  Contents  Index  Back
──────────────────────────────────────────────────────────────────────────────
Returns the current graphics cursor coordinates or the color attribute of a
specified pixel.
 
POINT {(n%) | (x%,y%)}
 
    ■ (n%)       Indicates the type of coordinate to return:
 
                 n%    Returns
                 ══    ═════════════════════════════════
                 0     The current viewport x coordinate
                 1     The current viewport y coordinate
                 2     The current window x coordinate
                 3     The 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.
 
Example:
    '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%
 
See Also    COLOR    PMAP    SCREEN    VIEW    WINDOW
            Color Attributes and Values