SP File Functions

 STRIP_PATH()   Strip path and optionally extension from a filespec
 ISVALFILE()    Checks a file name for validity
 FMOVE2PRIOR()  Moves to beginning of previous CRLF delimited line in
                a text file
 FMOVE2NEXT()   Move to beginning of next line in a text file
 FILEINFO()     Returns file date,time,size
 NKEY()         Gets key of an index file
 SFREADLINE()   Reads in text up to the next CRLF in a text file
 WRITEFILE()    Writes a line or lines  to a text file

 

SP_NKEY

NKEY()

  Short:
  ------
  NKEY() Gets key of an index file

  Returns:
  --------
  <cKey> => index key expression

  Syntax:
  -------
  NKEY(cIndex)

  Description:
  ------------
  Gets key expression of index <cIndex>. <cIndex> is
  the name of the index including extension. The function operates
  differently from .ntx to .ndx.

  Examples:
  ---------
   for i = 1 to nIndexes

       ?"Key for index: "+aInd[i]+" is "+NKEY(aInd[i])

   next

  Warnings:
  ----------
  Uses up a file handle temporarily. Opens up the index
  with low level file functions.

  Notes:
  -------
  NKEY() expects the full path of the index file and if
  no path is passed, will use SET DEFAULT setting

  Source:
  -------
  S_NKEY.PRG