home *** CD-ROM | disk | FTP | other *** search
- ********************
-
- FUNCTION Writedate
-
- PARAMETERS _file, _date
-
- * take the _file and the _date and write the _date
- * to the back end of the _file, marking the file with
- * the _date and a special code: ddddddddxxxxxSJSD
-
- IF PCOUNT() != 2
- RETURN(.F.)
- ENDIF
-
- IF TYPE("_file") + TYPE("_date") != "CD"
- RETURN(.F.)
- ENDIF
-
- PRIVATE _temp, _length, _fhandle, _string
-
- _temp = DTOC(_date)
- _length = 8
-
- _fhandle = FOPEN(_file, 2)
-
- FSEEK(_fhandle, FSEEK(_fhandle, 0, 2)) && Move to the end of file
-
- _string = TRIM(I2BIN(26) + _temp + TRANSFORM(_length, "9999999999") + "SJSD" + I2BIN(26))
-
- FWRITE(_fhandle, _string )
-
- FCLOSE(_fhandle)
- RETURN( (FERROR() = 0) )
-
- * End of File
-