INTEGER*4 topen n = topen( tlu, devnam, islabeled ) |
|||
---|---|---|---|
tlu |
INTEGER*4 |
Input |
Tape logical unit, in the range 0 to 7. |
devnam |
CHARACTER |
Input |
Device name; for example: '/dev/rst0' |
islabeled |
LOGICAL |
Input |
True=the tape is labeled A label is the first file on the tape. |
Return value |
INTEGER*4 |
Output |
n=0: OK n<0: Error |
This function does not move the tape. See perror(3F) for details.
Example: topen()--open a 1/4-inch tape file:
CHARACTER devnam*9 / '/dev/rst0' / INTEGER*4 n / 0 /, tlu / 1 /, topen LOGICAL islabeled / .false. / n = topen( tlu, devnam, islabeled ) IF ( n .LT. 0 ) STOP "topen: cannot open" WRITE(*,'("topen ok:", 2I3, 1X, A10)') n, tlu, devnam END
topen ok: 0 1 /dev/rst0