Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- FlexFile Reference Guide - <b>v_isopen()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 V_ISOPEN()
 Determine if a file is open in an area.
-------------------------------------------------------------------------------

 Syntax

    V_ISOPEN( [<nArea> | <cAlias>] )      ->   lStatus

 Arguments

    <nArea> or <cAlias> refers to the number or name of the target DBV
    work area. If not specified, the current DBV work area is assumed.

 Returns

    V_ISOPEN() returns (.T.) if there is a file open in the current or
    specified DBV work area.  Otherwise, it returns (.F.).

    If a character alias is passed, V_ISOPEN() will return true if the
    alias is valid in any DBV work area.  If the character alias is
    not valid for any DBV work area, V_ISOPEN() will return (.F.).

 Description

    V_ISOPEN() tests the current or specified area returning a logical
    (.T.) if a file was found to be open in that area.  This function
    is important because the behavior of V_SELECT() does not allow
    this test as SELECT() does in Clipper (see V_SELECT()).

 Examples

    V_FILES(5)                    // Set maximum open files to five
    V_USE( "file1" )              // Open files in areas one and three.
    V_SELECT(3)
    V_USE( "file2" )

    FOR x = 1 TO 5
       ? V_ISOPEN(x), x           // Results: .T. for x=1 and x=3
    NEXT

    IF V_ISOPEN( "bogus" ) .OR. !V_ISOPEN( "file1" )
       ? "This is unreachable code."
    ELSE
       ? "Every thing went as expected!"
    ENDIF

See Also: V_SELECT() V_ALIAS() V_USE()

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