ISDRIVE(<C drive letter>)
Evaluates whether a specified disk drive exists and is ready.
Returns <expL> true if drive exists and is working, otherwise false.
Useful in installation or backup programs. Prevents the DOS
"Abort, Retry, Ignore" message from interrupting a program.
<drive letter> may be uppercase or lowercase.
Returns false if anything prevents the drive from working,
such as a floppy disk being incorrectly placed in the drive.
drive_let = SPACE(1)
DO WHILE .T.
@...SAY "Enter drive letter: GET drive_let PICTURE "A"
READ
IF ! ISDRIVE(drive_let)
@...SAY "Drive is not available, please reenter."
ELSE
EXIT
ENDIF
ENDDO
Hazard
Works only on standard DOS drives, i.e., not over 32Mb.
On a single-floppy system, ISDRIVE("B") is slow.
Wherever possible, library routines use DOS function calls
(int 21h) for maximum portability between various computers.
But, for the library to perform an operation where that
facility is not available from DOS, we had to use a direct ROM
BIOS interrupt. These may not work properly (or at all) on
some computers. Test this function on the target hardware
before relying on their use in your application.
Placed in the Public Domain by Tom Rettig Assoc.