A General Description of FPATH and Its FunctionsID: Q115416 The information in this article applies to:
SUMMARYThis a general guideline of the functions contained within the FPATH library. FPATH is a library of string-handling routines for manipulating MS- DOS strings, filenames, and pathnames. This information was taken from the FPATH.C file, which is distributed with the FoxPro Library Construction Kit. FPATH itself should be compiled with the large memory model.
MORE INFORMATIONThe following information of the individual functions is laid out in the following manner:
JUSTFNAME // just file name (stem+ext)This function returns the filename portion of a file/path name.
Returns: string
JUSTSTEM // just stem nameThis function returns the stem portion of a file/path name.
Returns: string
JUSTEXT // just file extensionThis function returns the extension of a file/path name.
Returns: string
JUSTPATH // just path name (no file name)This function returns the path portion of a file/path name.
Returns: string
JUSTDRIVE // just drive designationThis function returns the drive designation of a file/path name.
Returns: string
FORCEEXT // force file extension to ...This function returns parameter 1 with the extension changed to parameter 2. If there isn't an extension on parameter 1 already, it adds one.
Returns: string
This function adds parameter 2 as the extension of parameter 1, but
only if parameter 1 does not have an extension. If it does, this
function simply returns parameter 1.
Returns: string
Add a trailing backslash to a path name, unless there is already one
there or the string is empty. Returns a pathname.
Returns: string
VALIDPATH // is this a valid path/file name?Returns TRUE if the filename passed as a parameter is a valid MS-DOS file name.
Returns: boolean
CLEANPATH // clean up a file/path nameReturns a cleaned-up file and path name, stripping out invalid chars, eliminating duplicate backslash chars, making sure there aren't too many colons, etc.
Returns: string
REDUCE // reduce white space to single blankReduce multiple white space characters to a single space and trims all leading and trailing white space. If the optional second parameter is non-zero, quoted strings will be unaffected.
Returns: string
STRFILTER // filter out anything that isn't in second stringFilter out any characters that aren't in filt_str.
Returns: string
Counts the number of words in a string. Words are delimited by
characters in the break string, or by DFTBREAK characters if no break
string is specified.
Returns: int
WORDNUM // word number i from stringReturns the "index-th" word in a string, delimited by the break string. If no break string is specified, the function uses spaces, tabs and commas to delimit words.
Returns: string
NEXTWORD // next word from stringReturns the next word in a string, beginning with the index specified by the second parameter. It skips break characters from the index position forward. It accepts an optional third parameter containing a string of break characters. If no break string is specified, only white space characters are break characters.
Returns: string
FCTNPARM // function parameter iReturns the specified parameter in a string of function parameters, accounting for nested parentheses, etc.
Returns: string
Auns: string
This routine returns the bitwise "exclusive or" of byte1 and byte2.
Returns: int
BOR // or two numbersThis routine returns the bitwise "inclusive or" of byte1 and byte2.
Returns: int
BAND // and two numbersThis routine returns the bitwise "and" of byte1 and byte2.
Returns: int
BNOT // not a numberThis routine returns the ones' compliment of byte1.
Returns: int
BSHR // shift a number rightThis routine returns byte1 shifted right by num positions, or by one position if num is not specified. As bytes are shifted, the new bytes on the left are zero-filled.
Returns: int
BSHL // shift a number leftThis routine returns byte1 shifted left by num positions, or by one position if num is not specified. As bytes are shifted, the new bytes on the right are filled with 0.
Returns: int
This routine returns a FoxPro numeric variable corresponding to the
double (8-byte) number passed to it as a character string. It is
useful for converting data written by other applications into FoxPro
format.
Returns: floating point number
This routine returns a double (8 byte) number corresponding to the
FoxPro numeric variable passed to it. It is useful for converting data
written by other applications into FoxPro format. The double number is
returned in a character string.
Returns: String, via value structure
This routine returns a FoxPro numeric variable corresponding to the
real (6-byte) number passed to it as a character string. It is useful
for converting data written by other applications into FoxPro format.
Returns: floating point number
This routine returns a FoxPro numeric variable corresponding to the
long int (4-byte) number passed to it as a character string. It is
useful for converting data written by other applications into FoxPro
format.
Returns: floating point number
This routine returns a FoxPro numeric variable corresponding to the
for converting data written by other applications into FoxPro format.
Returns: floating point number
Tests for internal fpath functions
This is information was taken from the FPATH.C file which is
distributed with the FoxPro Library Construction Kit.
This is a library of string handling routines for manipulating MS-DOS strings, filenames and pathnames. It should be compiled with the Large memory model. Additional reference words: FoxDos FoxWin 2.00 2.50 2.50a 2.50b 2.60 lck KBCategory: kbinterop kbtool kbprg kbref KBSubcategory: FxtoolLck |
|
Last Reviewed: June 27, 1995 © 1999 Microsoft Corporation. All rights reserved. Terms of Use. |