home *** CD-ROM | disk | FTP | other *** search
- *******************
-
- FUNCTION Writelogic
-
- PARAMETERS _file, _value
-
- * take the _file and the _value and write the _value
- * 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("_value") != "CL"
- RETURN(.F.)
- ENDIF
-
- PRIVATE _temp, _length, _fhandle
-
- _length = 3
- _temp = TRIM(I2BIN(26) + IF(_value, ".T.", ".F.") + TRANSFORM(_length, "9999999999") + "SJSL" + I2BIN(26))
- _fhandle = FOPEN(_file, 2)
- FSEEK(_fhandle, FSEEK(_fhandle, 0, 2))
- FWRITE(_fhandle, _temp)
- FCLOSE(_fhandle)
- RETURN( (FERROR() = 0) )
-
- * End of File
-