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

db file: fixed length fields termination characters

 
Markus Butz
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

This is related to the B&S assignement:

I have implemented the Data class to read and write to the DB file. According to the assignment ("all fields ..., null terminated if less than the maximum length for the field") I have used the "0x00" value for the bytes to fill a field value.

Now I have noticed a difference to the originally provided db file: There the ASCII "blank" character with the byte value 0x20 had been used to fill the fields up their maximum length.

My question: Is it advisable to stick to the original file and therefor to change my implementation to fill the field values with blanks?

Many thanks,
Markus
 
Muthaiah Ramanathan
Ranch Hand
Posts: 102
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's your choice. If they replace the db file with another file that has the null termination, your application should not choke. But I remember another statement, that you should not alter the database file format also - so you might just want to continue to fill the field values with blanks. Whatever you do, it should be justified in the choices.txt.

If you would search for earlier posts for the same you will find a lot of information.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic