CT_DISKREADY

 DISKREADY()
 Tests to see if a disk drive is ready

 Syntax

     DISKREADY([<cDrive>], [<lDOS/BIOS>]) --> lDiskReady

 Arguments

     <cDrive>  Designates the drive designator (A, B, C, etc.) of the
     drive to test.  The default is the current disk drive.

     <lDOS/BIOS>  This logical parameter allows you to designate whether
     you want the function tested through the BIOS (.F.) or DOS (.T.).  The
     default is discussed in the Description below.

 Returns

     DISKREADY() returns .T. when the drive being tested is ready to use.

 Description

     To save space, you must frequently make multiple disk copies.
     DISKREADY() allows you to wait for a user disk change, without having to
     confront known DOS errors, or use CA-Clipper error trap functions.  Be
     sure to differentiate between floppy tests and "true" hard disks and
     logical partitions.

 DOS or BIOS

     In the simplest case, this function tests the respective drive through
     DOS.  If drive B is unavailable, the message  "Please insert disk in
     drive B:..." is output from the operating system.  When you test floppy
     drives, drive A: and B:, the BIOS route is recommended, since no message
     is output.  In any event, A: and/or B: can be mapped drives within a
     network.  Use the following logical expression for all the previous
     situations:

     (NETDISK(<cDrive>) .OR. <cDrive> >= "C")

     This logical expression returns .T. when the respective drive is either
     on the network or has a drive identifier of C: or higher.

 Examples

     The system waits between individual copy procedures until drive A: is
     ready again:

     DO Copy                        // Call copy procedure
     ? "Please insert a disk in Drive A:!"
     DO WHILE .NOT. DISKREADY("A")
        *...
     ENDDO
     DO Copy                        // Call copy procedure

See Also: DISKREADYW()

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.