[<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 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()
This page created by ng2html v1.05, the Norton guide to HTML conversion utility. Written by Dave Pearson