ID: Q115416
The information in this article applies to:
This 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.
The following information of the individual functions is laid out in the following manner:
<function name> // <Brief description>
---------------------------------------
<General description of functionality>
Usage: <Syntax>
Returns: <Return value of function>
Usage: justfname(pathname)
Returns: string
Usage: juststem(pathname)
Returns: string
Usage: justext(pathname)
Returns: string
Usage: justpath(pathname)
Returns: string
Usage: justdrive(pathname)
Returns: string
Usage: forcetext(pathname,extension)
Returns: string
DEFAULTEXT // give file a default extension
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.
Usage: defaultext(pathname,extension)
Returns: string
ADDBS // add a backslash if one is needed
Add a trailing backslash to a path name, unless there is already one
there or the string is empty. Returns a pathname.
Usage: addbs(pathname)
Returns: string
Usage: validpath(pathname)
Returns: boolean
Usage: cleanpath(pathname)
Returns: string
Usage: reduce(string,[skipquotes])
Returns: string
Usage: strfilter(string,filt_str)
Returns: string
WORDS // number of words in 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.
Usage: words(string,[break])
Returns: int
Usage: wordnum(string,index,[break])
Returns: string
Usage: nextword(string,index,[break])
Returns: string
Usage: fctnparm(string,index)
Returns: string
Auns: string
BXOR // xor two numbers
This routine returns the bitwise "exclusive or" of byte1 and byte2.
Usage: bxor(byte1,byte2)
Returns: int
Usage: bor(byte1,byte2)
Returns: int
Usage: band(byte1,byte2)
Returns: int
Usage: bnot(byte1)
Returns: int
Usage: bshr(byte1,num)
Returns: int
Usage: bshl(byte1,num)
Returns: int
DBL2NUM // convert 8-byte double to Fox num
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.
Usage: dbl2num(8 bytes)
Returns: floating point number
NUM2DBL // convert Fox num to 8-byte double
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.
Usage: dbl2num(8 bytes)
Returns: String, via value structure
FLOAT2NUM // convert 6-byte float to Fox num
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.
Usage: float2num(6 bytes)
Returns: floating point number
LONG2NUM // convert 4-byte float to Fox num
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.
Usage: long2num (4 bytes)
Returns: floating point number
INT2NUM // convert 2-byte float to Fox num
This routine returns a FoxPro numeric variable corresponding to the
int (2-byte) number passed to it as a character string. It is useful
for converting data written by other applications into FoxPro format.
Usage: int2num (2 bytes)
Returns: floating point number
FPATHTEST // testing function
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