home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Monster Media 1993 #2
/
Image.iso
/
database
/
migratfp.zip
/
ZIPFILE.EXE
/
UDF_FKY
/
FOXPROC.PRG
< prev
Wrap
Text File
|
1993-04-11
|
3KB
|
125 lines
* Returns number of parameters passed
FUNCTION Pcount
RETURN PARAMETERS()
* Returns time stamp on a disk file
FUNCTION Ftime
PARAMETER mfile
PRIVATE mfiles, mfile
* Copy file specs to array, return time
=adir(mfiles, mfile)
RETURN mfiles[1,4]
* Returns date stamp on a disk file
FUNCTION Fdate
PARAMETER mfile
PRIVATE mfiles, mfile
* Copy file specs to array, return date
=adir(mfiles, mfile)
RETURN mfiles[1,3]
* Returns number of fields in current database
FUNCTION Fldcount
RETURN FCOUNT()
* Returns name of topmost window
* If you prefer, substitute WOUTPUT() (current output window)
FUNCTION Window
RETURN WONTOP()
* Returns .T. if expression passed is blank (empty)
FUNCTION Isblank
PARAMETER mexpr1
PRIVATE mexpr1, mexpr2
mexpr2 = "&mexpr1"
RETURN EMPTY("&mexpr2")
* Returns number of tags in an MDX file in any work are
FUNCTION Tagcount
PARAMETERS mmdxfile, malias
PRIVATE mmdxfile, malias, mtagnum
IF PARAMETERS() < 2
malias = ALIAS()
ENDIF
IF PARAMETERS() < 1
mmdxfile = MDX(1)
ENDIF
mtagnum = 1
DO WHILE NOT EMPTY(TAG(mmdxfile, mtagnum, malias)) AND mtagnum <= 47
mtagnum = mtagnum + 1
ENDDO
RETURN mtagnum-1
* Returns number of a specific tag in an MDX file in any work are
FUNCTION Tagno
PARAMETERS mtagname, mmdxfile, malias
PRIVATE mtagname, mmdxfile, malias, mtagnum, mreturn
IF PARAMETERS() < 3
malias = ALIAS()
ENDIF
IF PARAMETERS() < 2
mmdxfile = ""
ENDIF
mtagnum = 1
DO WHILE mtagnum <= 47
mcurrtag = TAG(mmdxfile, mtagnum, malias)
IF EMPTY(mcurrtag)
mreturn = 0
EXIT
ENDIF
IF mcurrtag = mtagname
mreturn = mtagnum
EXIT
ENDIF
mtagnum = mtagnum + 1
ENDDO
RETURN mreturn
* Returns FOR clause used to build conditional index tag
FUNCTION For
PARAMETERS mparm1, mparm2, mparm3
PRIVATE mparm1, mparm2, mparm3
DO CASE
CASE PARAMETERS() = 1
mreturn = SYS(2021, mparm1)
CASE PARAMETERS() = 2
IF TYPE("mparm1") = "N"
mreturn = SYS(2021, mparm1, mparm2)
ELSE
mdbf = DBF()
mworkarea = SELECT(0)
SELECT SELECT(1)
USE (mdbf) AGAIN INDEX (mparm1)
mreturn = SYS(2021, mparm2)
USE
SELECT (mworkarea)
ENDIF
CASE PARAMETERS() = 3
mdbf = DBF(mparm3)
mworkarea = SELECT(0)
SELECT SELECT(1)
USE (mdbf) AGAIN INDEX (mparm1)
mreturn = SYS(2021, mparm2)
USE
SELECT (mworkarea)
ENDCASE
RETURN mreturn