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>filevalid()</b> http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
 FILEVALID()
 Tests whether a string has a valid file name
------------------------------------------------------------------------------
 Syntax

     FILEVALID(<cFileName>) --> lValid

 Argument

     <cFileName>  Designates the file name you want to test for validity.

 Returns

     FILEVALID() returns .T. when the designated name is valid.

 Description

     FILEVALID() determines if a string contains a valid file name.  You
     could also test the validity of user input in this way.  If necessary,
     path and drive designations must be removed from the string.  The
     tokenizer described in the string chapter is available for this purpose
     (see Examples).

 Example

     The last token in a string with drive and path designations should
     contain the file name:

     ACCEPT "Target_File  " TO cVar
     cFileName  := TOKEN(cVar, " \:")        // Last token
     DO WHILE .NOT. FILEVALID(cFileName)
        * Error message ...
        ACCEPT "Target_File  " TO cVar
        cFileName  := TOKEN(cVar, "\:")      // Last token
     ENDDO


See Also: TOKEN()

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