home *** CD-ROM | disk | FTP | other *** search
/ Programmer 7500 / MAX_PROGRAMMERS.iso / PROGRAMS / UTILS / MOUSE / MSMOUSE1.ZIP / FOR.ZIP / FOR1.FOR < prev    next >
Encoding:
Text File  |  1989-02-10  |  1.1 KB  |  41 lines

  1. ******************************************************************
  2. *  FOR1.FOR                                                      *
  3. *                                                                *
  4. *  Short example of calling mouse functions from FORTRAN 4.1     *
  5. *                                                                *
  6. *  Compile using large model (default), and link with MOUSE.LIB  *
  7. *  Example:   fl /FPc for1.for -link mouse                       *
  8. ******************************************************************
  9.  
  10.       PROGRAM FOR1
  11.  
  12.       INTEGER*2 M1, M2, M3, M4
  13.  
  14. * Display short message for user
  15.       WRITE (*,*) 'Press either mouse button to quit'
  16.  
  17. * Mouse Reset and Status
  18.       M1 = 0
  19.       CALL MOUSEL (M1, M2, M3, M4)
  20.  
  21. * Show Cursor
  22.       M1 = 1
  23.       CALL MOUSEL (M1, M2, M3, M4)
  24.  
  25.  100  CONTINUE
  26.  
  27. * Get Button Status and Mouse Position
  28.       M1 = 3
  29.       CALL MOUSEL (M1, M2, M3, M4)
  30.  
  31. * Loop until either button is pressed
  32.       M2 = MOD(M2, 4)
  33.       IF (M2 .EQ. 0) GOTO 100
  34.  
  35. * Mouse Reset and Status
  36.       M1 = 0
  37.       CALL MOUSEL (M1, M2, M3, M4)
  38.  
  39.       STOP
  40.       END
  41.