Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Tom Rettigs Library - isfixed(<c drive letter>) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 ISFIXED(<C drive letter>)
 Evaluates whether a specified disk drive is a functioning hard disk.
 Returns <expL> true if <drive> is a hard disk and working, otherwise false.

 Useful in backup and installation programs.

 <drive letter> may be uppercase or lowercase.

 drive_let = SPACE(1)
 DO WHILE .T.
    @...SAY "Enter drive letter of hard disk:";
        GET drive_let PICTURE "A" VALID ISDRIVE(drive_let)
    READ
    IF .NOT. ISFIXED( drive_let )
       @...SAY "Drive is not a hard disk or is not working"
    ELSE
       EXIT
    ENDIF
 ENDDO

 * Check for floppy disk with ISDRIVE()
 * because .NOT. ISFIXED() could be invalid drive only
 IF ISDRIVE( D ) .AND. .NOT. ISFIXED( D )
    ? "Drive D is a removable disk"
 ENDIF

 Hazard
    False return value indicates either a floppy disk or an invalid
    drive; use ISDRIVE() to differentiate.

    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.

See Also: DIRMAKE() ISDRIVE()

Online resources provided by: http://www.X-Hacker.org --- NG 2 HTML conversion by Dave Pearson