Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- Clipper Tools One Guide - <b>diskstat()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
DISKSTAT()

Syntax:     DISKSTAT(<expC>)

Arguments:  <expC> denotes on which drive (A,B,C,etc.)to determine
            the status of the last operation.

Returns:    A numeric value.
            The status of the diskette and the fixed disk operation.

                                          BIT#  87654321 Value

            Unknown command                    (       1)    1
            Address marker not found           (      1 )    2
            Sector not found                   (     1  )    4
            DMA overrun                        (    1   )    8
            CRC error                          (   1    )   16
            Controller error                   (  1     )   32
            Seek missed                        ( 1      )   64
            Time out                           (1       )  128

Usage:      If DOS signals a block device error, the cause of the error
            can be determined with DISKSTAT().  (see also ERRORORG().)

Notes:      The function will default to the current drive if <expC> is not
            passed.  The function is used to reproduce a system status
            in a Clipper application.  The system will store the status
            value in each case for all diskette and fixed disk operations.
            The status of the previous diskette operation will be lost if
            there is renewed access to a disk drive in the program.

Library:    CT1.LIB


--------------------------------- Example ------------------------------

Examples:   IF ERRORORG() = 2
               disk_error = DISKSTAT("A")
            ENDIF



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

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