home *** CD-ROM | disk | FTP | other *** search
/ Liren Large Software Subsidy 5 / 05.iso / a / a075 / 1.img / TOOLKIT1.EXE / SST248.PRG < prev    next >
Encoding:
Text File  |  1989-08-08  |  715 b   |  31 lines

  1. *******************
  2.  
  3. FUNCTION Writelogic
  4.  
  5.    PARAMETERS _file, _value
  6.  
  7.    * take the _file and the _value and write the _value
  8.    * to the back end of the _file, marking the file with
  9.    * the _date and a special code: ddddddddxxxxxSJSD
  10.  
  11.    IF PCOUNT() != 2
  12.       RETURN(.F.)
  13.    ENDIF
  14.  
  15.    IF TYPE("_file") + TYPE("_value") != "CL"
  16.       RETURN(.F.)
  17.    ENDIF
  18.  
  19.    PRIVATE _temp, _length, _fhandle
  20.  
  21.    _length = 3
  22.    _temp = TRIM(I2BIN(26) + IF(_value, ".T.", ".F.") + TRANSFORM(_length, "9999999999") + "SJSL" + I2BIN(26))
  23.    _fhandle = FOPEN(_file, 2)
  24.    FSEEK(_fhandle, FSEEK(_fhandle, 0, 2))
  25.    FWRITE(_fhandle, _temp)
  26.    FCLOSE(_fhandle)
  27.    RETURN( (FERROR() = 0) )
  28.  
  29. * End of File
  30.  
  31.