Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- CA-Clipper Tools . Books 1-3 - <b>filesfree()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FILESFREE()
 Specifies the number of files you can open
------------------------------------------------------------------------------
 Syntax

     FILESFREE() --> nFreeHandles

 Returns

     FILESFREE() returns the number of available handles.

 Description

     This function returns the number of available handles that correspond to
     the number of files you can open.  This enables you to avoid DOS error
     4.

 Note

     .  Immediately after you start a CA-Clipper application, a value
        -- smaller than that of FILESMAX() -- is returned.  This happens
        because the operating system and application itself is already using
        handles.

 Examples

     .  Can I still open a file?

        IF FILESFREE() > 0                // At least 1 handle free?
           USE CUSTOMER                   // Open a file
        ENDIF

     .  Be careful when you open multiple indexes at the same time!

        IF FILESFREE() > 1                // At least 2 handles free?
           USE CUSTOMER INDEX CUSTNR      // Open 2 files
        ENDIF


See Also: FILESMAX()

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