EasyManua.ls Logo

NCR Decision Mate V - Page 407

NCR Decision Mate V
426 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
MOUSE
«!
PROCEDURE SETMAX (XMAX,YMAX: INTEGER)
Example
Here is an example fo r th e use o f the Mouse procedures in
Pascal.
In th e fir s t part o f th e main program, th e maximum Mouse
position is s e t by means o f th e X and Y coordinates; and
th e presen t Mouse position is s e t to zero. In th e second
p art o f th e main program, th e variables are c o lle c te d and
displayed on th e screen. SWl, SW2, and SW3 designate th e
sw itch es on th e Mouse (here th e HAWLEY MARK I I Mouse),
which can be on or o ff. X is th e Mouse position on th e X
coordinate, Y th e Mouse position on the Y coordinate.
{ EXAMPLE MOUSE PROGRAM PASCAL }
PROGRAM MOUSETP;
USES MOUSE;
VAR SWl,SW2,SW3,X , Y ,X0,Y0,XM,YM: INTEGER; C:CHAR;
PROCEDURE FIN(VAR C:CHAR);
{ PROMPT FOR FINISH }
BEGIN
GOTOXY(0,18);
WRITE (' DO YOU WANT TO FINISH? Y/N '),*
READLN(C);
END;
BEGIN
{ CLEAR SCREEN, CURSOR INVISIBLE }
WRITELN(CHR(27),'@0',CHR(27),CHR(69));
WRITELN(' ****** MOUSE EXAMPLE PASCAL ******);
GOTOXY(0,16);
WRITELN(' TO STOP PRESS SWITCH 1 ');
8-5

Table of Contents

Related product manuals