I2Bin Function |
|
Namespace: XSharp.Core
1ptrHandle = FOpen2("sales.dbf", FO_READWRITE) 2// Convert date of last update to int 3cYear := I2Bin(1990) 4// The more efficient _Chr() is used instead of 5// I2Bin() since the return fits in one byte 6cMonth := _Chr(12) 7cDay := _Chr(15) 8// Point to the date of last update 9FSeek(ptrHandle, 1, FS_SET) 10// Write new update date using only the first 11// byte 12FWrite3(ptrHandle, cYear, 1) 13FWrite3(ptrHandle, cMonth, 1) 14FWrite3(ptrHandle, cDay, 1) 15FClose(ptrHandle)