BASIC Interface
To use th e Mouse procedures in a BASIC program , decla re
USES MOUSE
The subroutine and param eter d efin ition can be found b elow :
G MO U S
SUB GMOUS(SW3,SW2,SWl,Y,X)
INTEGER SW1, SW 2, SW3, Y, X
S E T P O S
SUB SETPOS (X,Y)
INTEGER X,Y
SETMAX
SUB SETMAX (XMAX,YMAX)
INTEGER XMAX,YMAX
Example
Here is an exam ple fo r th e use o f th e Mouse procedures ir
BASIC.
In th e lin e startin g with 10, th e maximum Mouse position if
s e t b y means o f th e X and Y coordinates. In th e line
starting w ith 20, th e present Mouse position is s e t to zero
In th e lin e o f th e main program startin g with 100, the
variables are co lle c te d and displayed on th e screen.
8-10