Subroutine SelDev(Lun) BYTE BNAME(40) C C Show the device numbers and their names and ask for C a device number. Attempt to select that device. If C not successful, display an error message and ask for C a new device number. C EXTERNAL LEN C C Display device numbers and names. C Type 91 91 FORMAT(/) IDEV = 1 110 CALL GSDNAM(IDEV,BNAME) L = LEN(BNAME) IF (L .EQ. 0) GO TO 120 TYPE 111, IDEV, (BNAME(I), I=1,L) 111 FORMAT(' Device ',I2,' is ',40A1) IDEV = IDEV + 1 GO TO 110 120 CONTINUE C Ask for a device number. Type 91 5 TYPE 121 121 FORMAT('$Graphics device number? ') ACCEPT 122, IDEV 122 FORMAT(I5) C Select that device. CALL DEVSEL(IDEV,Lun,IERR) IF (IERR .EQ. 0) GO TO 200 TYPE 131 131 FORMAT(' That device is not available at this time!') GO TO 5 200 Continue Return END