Retro video games delivered to your door every month!
Click above to get retro games delivered to your door ever month!
X-Hacker.org- NetLib for Clipper, Version 6.0 - n_fmap( <nhandle> ) http://www.X-Hacker.org [<<Previous Entry] [^^Up^^] [Next Entry>>] [Menu] [About The Guide]
N_FMAP( <nHandle> )


Parameters

<nHandle>
File handle number.


Returns

Filespec associated with handle. If the specified handle is not open, 
or if an invalid handle is given, a null string is returned.


Description

The lowest file handle number usable by your application is 5, since 
DOS reserves handle 0-4 for its own use.

The filename returned by N_FMAP() will appear exactly as it was 
specified in the command that created it. Remember, however, that many 
Clipper commands add a default extension (NTX, DBF, and so on) if you 
do not specify one.


Examples

CLOSE DATA
USE CUSTFILE INDEX CUSTNO
? N_FMAP(5)
CUSTFILE.DBF

? N_FMAP(6)
CUSTFILE.NTX

// Locate the handle for a specific filename 
FUNCTION GetHandle( cFilename )
  LOCAL k

  FOR k = 5 TO N_HANDLES(-1)  // Can't be handle 0-4
     IF UPPER(N_FMAP(k)) == UPPER(cFilename)
       RETURN k               // Handle #
     ENDIF
  NEXT
RETURN 0                      // Not found



See Also: N_FSPEC() N_HANDLES()

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