Win a copy of Functional Reactive Programming this week in the Other Languages forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

DB file -Data section.

 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
My assignment states UrlBird.
Data section.
Repeat to end of file:
1 byte "deleted" flag. 0 implies valid record, 1 implies deleted record


When I read the field the byte is BLANK! do I need to set this to 0?

here is my code to read in that 1 byte.


Output



Thanks!
 
Anton Golovin
Ranch Hand
Posts: 476
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi, James. I used the following code to read in a record:


[ November 11, 2004: Message edited by: Anton Golovin ]
 
jiju ka
Ranch Hand
Posts: 308
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Prior to reading the complete record checking whether the record is already deleted or not is better.

If the flag is not valid you don't have to set it to the right one( if the requirement is not saying so). In my asignment flag can be changed during insert or delete.
 
James Clinton
Ranch Hand
Posts: 190
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Anton
ASCII-US doesn't work. Are you sure its not US-ASCII ?


 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic