PROGRAM delim
    IMPLICIT NONE
    INTEGER :: err

    OPEN (42, FILE="/dev/tty", ACTION='write', &
        DELIM="quote", IOSTAT=err)
    IF (err /= 0) THEN
        PRINT *, "Unable to open /dev/tty"
        STOP 1
    END IF

    WRITE (42, *, IOSTAT=err) "Kilroy was here"

    IF (err /= 0) THEN
        PRINT *, "Unable to write to /dev/tty"
        STOP 1
    END IF
    CLOSE (42, IOSTAT=err)
    IF (err /= 0) THEN
        PRINT *, "Unable to close /dev/tty"
        STOP 1
    END IF
END PROGRAM delim
