• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

question about the delete()

 
Ranch Hand
Posts: 49
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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?
 
Ranch Hand
Posts: 4982
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • 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
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi,Nicholas:
thank you,
it's great!
 
reply
    Bookmark Topic Watch Topic
  • New Topic