Win a copy of The Little Book of Impediments (e-book only) this week in the Agile and Other Processes forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

question about the delete()

 
Jofer Chan
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,everyone:
in my Introduction,explain follow:
2 byte flag. 00 implies valid record, 0x8000 implies deleted record
in the Data,the delete() to write 2 byte flag for delete a record ,
but 0x8000 is int,is 5 byte,can't to write the db file,
how to implement the delete function?
 
Nicholas Cheung
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,
If you convert the hex number 0x8000 to integer, you will discover that it is in fact the upper bound of short integer value: 32768.
Thus, it is a 2-byte flag (16 bit), and you can regard it as 2 single bytes:
one is 0x80 and the other is 0x00.
Hope this help.
Nick
[ December 10, 2003: Message edited by: Nicholas Cheung ]
 
Jofer Chan
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,Nicholas:
thank you,
it's great!
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic