CT_FILESFREE

 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 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()

 

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.