Trailing-Edge
-
PDP-10 Archives
-
decuslib10-07
-
43,50446/getopt.f4
There are no other files named getopt.f4 in the archive.
SUBROUTINE GETOPT(N)
C************************************************************
C
C THIS ROUTINE IS USED TO RETURN THE NUMBER
C OF THE NEXT OPTION HIT.
C
C POSSIBLE ERRORS:
C NONE
C
C WARNING:
C IF YOU TRY AND RETURN AN OPTION HIT, WHEN THE
C OPTION LIST IS NOT ENABLED ON THE SCREEN, YOUR
C PROGRAM WILL GO INTO AN ENDLESS LOOP, WAITING
C FOR THE HIT.
C
C ROUTINES CALLED:
C LPON - ENABLES THE LIGHT PEN
C ENABLE - ENABLES A DISPLAY FILE
C LPHIT - AWAITS A LIGHT PEN HIT
C DISABL - DISABLES A DISPLAY FILE
C IPHYSX - RETURNS RASTER X OF USER X
C IPHYSY - RETURNS RASTER Y OF USER Y
C USERX - CONVERTS RASTER X TO USER X
C
C************************************************************
IMPLICIT INTEGER (A - W, Z)
REAL USERX, USERY
INTEGER OPTION(10, 3)
COMMON /OPTBLK/ OPTION, OPMSG, OPPTR, OPLIST
CALL LPON
100 ID = -1
CALL LPHIT(ID, X, Y)
IF(ID .NE. OPLIST) GO TO 100
IX = IPHYSX(X)
IY = IPHYSY(Y) - 305
N = IY / 35
N = 10 - N
RETURN
END