CT_DISKSTAT

 DISKSTAT()
 Determines the status of a drive.

 Syntax

     DISKSTAT([<cDrive>]) --> nStatus

 Argument

     <cDrive>  Designates the drive designator (A, B, C, etc.) of the
     drive for which the status of the last operation is determined.  The
     default is the current disk drive.

 Returns

     DISKSTAT() returns the status of the floppy or hard disk operation as a
     number.  The bits have the following meanings:

     Table 7-7:  Drive Status Coding
     ------------------------------------------------------------------------
     Bit     Symb. constants     Definition
     ------------------------------------------------------------------------
     1       DST_INVALID         Unknown command
     2       DST_READONLY        Address marker not found
     3       DST_SECTOR          Sector not found
     4       DST_DMA             DMA overflow
     5       DST_CRC             CRC error
     6       DST_CONTROLLER      Controller error
     7       DST_SEEK            Seek operation failure
     8       DST_TIMEOUT         Timeout error
     ------------------------------------------------------------------------

 Description

     When DOS returns a "block device error" message  (See ERRORORG()) and
     DISKSTAT() to determine a more detailed cause of the error).

 Note

     .  This function passes the system status to a CA-Clipper
        application.  The system saves a status value for all floppy and hard
        disk operations.  When you reaccess a floppy disk drive from within
        your program, the previous disk operation status is lost.  The same
        applies to hard disk status.

 Example

     Determine if the system was unable to find an address marker:

     IF ERRORORG() == DST_READONLY
        DiskError  :=  DISKSTAT("A")
     ENDIF

See Also: ERRORBASE() ERRORCODE() ERRORORG()

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.