home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Gold Fish 1
/
GoldFishApril1994_CD2.img
/
d4xx
/
d499
/
diglib
/
diglib.lzh
/
source
/
SELDEV.for
< prev
next >
Wrap
Text File
|
1991-05-22
|
905b
|
34 lines
SUBROUTINE SELDEV(LUN)
IMPLICIT NONE
INTEGER LUN,IDEV,I,IERR
REAL*4 L
CHARACTER*1 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
INTEGER LEN
C
C Display device numbers and names.
C
IDEV = 1
1 CALL GSDNAM(IDEV,BNAME)
L = LEN(BNAME)
IF (L .EQ. 0) GO TO 5
WRITE(9,1111) IDEV, (BNAME(I), I=1,L)
1111 FORMAT(' Device ',I2,' is ',40A1,/)
IDEV = IDEV + 1
GO TO 1
5 WRITE(9,'(A\)') ' Number of the graphics device to use? '
READ(9,'(I5)') IDEV
6 CALL DEVSEL(IDEV,LUN,IERR)
IF (IERR .EQ. 0) GO TO 10
TYPE *, ' THAT DEVICE DOES NOT EXIST'
GO TO 5
10 Continue
Return
END