FINDCLOSE

Top  Previous  Next

Syntax

FINDCLOSE(handle as UINT)

Description

After you are finished reading a directory you must close the handle with FINDCLOSE. If the handle is not closed memory loss will occur.

Parameters

handle - Handle returned by the FINDOPEN function

Return value

None

Remarks

You must not close a handle more than once.

See Also: FINDOPEN, FINDNEXT

Example usage

OPENCONSOLE
DEF dir:UINT
DEF filename:STRING
 
dir = FINDOPEN("c:\\*.*")
IF(dir)
    DO
        filename = FINDNEXT(dir)
        PRINT filename
    UNTIL filename = ""
    FINDCLOSE dir
ENDIF
 
PRINT "Press Any Key"
DO:UNTIL INKEY$ <> ""
 
CLOSECONSOLE
END