GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Download
  • News
  • Community
  • Resources
  • Language Reference
  • SmallBASIC Manual

This view

  • Original page
  • New address

GeezerVison is showing smallbasic.github.io — SmallBASIC | PEN

Edit History

PEN

PEN ON|OFF

Home > Reference > Console

Enables/Disables the pen/mouse/tap mechanism. See function n = PEN(value) for information on how to read data from tap, mouse or pen.

Example

pen on

print "Press left mouse button or tab screen. Press q to quit."

while(1)          
    if(pen(3)) then
        PosX = pen(4)
        PosY = pen(5)
        locate 1,0: print "Click/tap at position: " + PosX + " , " + PosY
    endif
    
    k = inkey()
    if(len(k) == 1 AND k == "q") then end
    
    showpage
    delay(20)
wend

pen off
Code samples using PEN
004 loops.bas   006 arrays+.bas   100lines.bas   2048.bas   3d_palmx.bas   3d_torus.bas   3dtictac.bas   3dtorus.bas   3dttt.bas   3dttt.bas   4tune.bas   7gables.bas   agendus.bas   ai.bas   anball 1.0.bas   angel feather.bas   anomail.bas   Another center finder.bas   another look at trig functions.bas   balls.bas   base64.bas   betrayal: crows ii.bas   bezier's autograph book.bas   bezier_pen.bas   bezierbounce.bas   blackbox.bas   Blackbox.bas   boing.bas   bowling7.bas  
Console
AT   BEEP   CAT   CLS   DEFINEKEY   FORM   INKEY   INPUT   LINEINPUT   LINPUT   LOCATE   LOGPRINT   NOSOUND   PEN   PLAY   PRINT   SOUND   TAB  
This page was last edited on Tue, 12 Sep 2023 19:20:08 +0930 | Markdown processed with pandoc 3.1.12.1
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.