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