Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Turbo Basic - <b>pen light pen status function</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
PEN                      Light Pen Status                            Function

 y = PEN(n)

    Returns information about the status of the light pen. For the PEN
    function to be available, a PEN ON statement must first be executed.

           n    A numeric expression in the range 0 to 9; specifies the
                kind of information to be returned. Options are as
                follows:

                0   Returns -1 if light pen has been down since last PEN
                    function; otherwise returns 0.
                1   Returns x coordinate of location where pen was most
                    recently activated.
                2   Returns y coordinate of location where pen was most
                    recently activated.
                3   Returns -1 if pen switch is currently down; otherwise
                    returns 0.
                4   Returns x coordinate of last known valid pen location.
                5   Returns y coordinate of last known valid pen location.
                6   Returns row position (1-24) of location where pen was
                    most recently activated.
                7   Returns column position (1-80) of location where pen
                    was most recently activated.
                8   Returns row position (1-24) of last known valid pen
                    location.
                9   Returns column position (1-80) of last known valid pen
                    location.

See Also: PEN (Statement)

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson